-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Microsoft.Toolkit.Mvvm package #3229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michael-hawker
merged 256 commits into
CommunityToolkit:master
from
Sergio0694:feature/mvvm-apis
Aug 1, 2020
Merged
Changes from 1 commit
Commits
Show all changes
256 commits
Select commit
Hold shift + click to select a range
2c34963
Minor code refactoring
Sergio0694 1a72762
Added IoC.IsRegistered<TService>() API
Sergio0694 52a79f2
Minor bug fixes
Sergio0694 9dcca03
Added Ioc.GetAllRegisteredServices() API
Sergio0694 bfb8ccb
Minor code refactoring
Sergio0694 a58ecdd
Added Ioc.Unregister<TService>() API
Sergio0694 4554d3a
Added Ioc.Reset() API, minor bug fixes
Sergio0694 2cb2675
Added tests for the Ioc class
Sergio0694 f337280
Added Ioc.GetAllCreatedServices() API
Sergio0694 4f65e95
Minor code refactoring
Sergio0694 df973ea
Added Ioc.GetInstanceWithoutCaching<TService() API
Sergio0694 ce4b023
Minor code refactorings
Sergio0694 155b9de
Fixed an XML comment
Sergio0694 9d57eaf
Merge branch 'master' into feature/mvvm-apis
Sergio0694 e409d94
Fixed refactoring bugs
Sergio0694 4647330
Speed optimizations to Ioc.GetInstanceWithoutCaching<TService>()
Sergio0694 1c7cfe7
Added Ioc.TryGetInstance<TService> API
Sergio0694 6969545
Minor code refactoring
Sergio0694 5c88279
Fixed unit tests
Sergio0694 3b13c9e
Added empty Microsoft.Toolkit.Mvvm package
Sergio0694 ed5b3a1
Moved Ioc class to separate package
Sergio0694 47f1373
Added ObservableObject class
Sergio0694 bcd2674
Minor code style tweaks
Sergio0694 08dfe8a
Minor code refactorings
Sergio0694 ad613c3
Added RelayCommand type
Sergio0694 f93ae4f
Added the RelayCommand<T> type
Sergio0694 1e75231
Minor code refactoring
Sergio0694 79f4f4b
Ported minimal DictionarySlim<TKey, TValue> type from CoreFXLabs
Sergio0694 bb7db86
Added the IDictionary<in TKey> interface
Sergio0694 8963f3a
Initial draft of the Messenger class
Sergio0694 2e95d48
Added missing file headers
Sergio0694 805d940
Code tweaks and performance improvements
Sergio0694 5eacb12
Minor code style tweaks
Sergio0694 ae6ff24
Added DictionarySlim<TKey, TValue>.ContainsKey method
Sergio0694 0f7f2ac
Added Messenger.IsRegistered methods
Sergio0694 d0b110b
Added IReadOnlyDictionary<in TKey, out TValue> interface
Sergio0694 43c7202
Fixed some XML docs
Sergio0694 45c794d
Fixed a bug with new values being created when not needed
Sergio0694 6c68dcf
Renamed some interfaces to avoid naming collisions
Sergio0694 852e85e
Added Messenger.Unregister<TToken>() method
Sergio0694 3af3aff
Added more comments in the Messenger class
Sergio0694 ea68036
Added DictionarySlim<TKey, TValue>.Clear method
Sergio0694 7ab96f3
Added Messenger.Reset method
Sergio0694 6dc71d0
Added initial Messenger unit tests
Sergio0694 8c2cced
Minor code style tweaks
Sergio0694 6664609
Merge pull request #20 from Sergio0694/feature/high-perf-messenger
Sergio0694 bca38f5
Code refactoring
Sergio0694 de0d2ba
Added Messenger APIs with no input message
Sergio0694 6d22101
Added RequestMessageBase<T> type
Sergio0694 2cd0a20
Added Messenger request methods
Sergio0694 595474c
Minor code refactoring
Sergio0694 82bf497
Added PropertyChangedMessage<T> type
Sergio0694 82946f9
Added ViewModelBase class
Sergio0694 e549aef
The Messenger class is not static anymore
Sergio0694 1121fbe
Added messaging customization to ViewModelBase
Sergio0694 1e3e1e4
The Ioc class is not static anymore
Sergio0694 7396d08
Added dependency injection of service provider in ViewModelBase
Sergio0694 6fa643b
Code refactoring
Sergio0694 c40fc58
Added IIoc interface
Sergio0694 dd7e973
Added IMessenger interface
Sergio0694 fc63822
Moved request methods to extensions
Sergio0694 5b1258b
Code refactoring
Sergio0694 59a6a87
Added tests for ObservableObject
Sergio0694 245745b
Added tests for ViewModelBase
Sergio0694 fd3aba3
Added tests for relay commands
Sergio0694 c0a863b
Messenger XML comments improved
Sergio0694 2b38bac
Added ObservableObject.SetAndNotifyOnCompletion<TTask> method
Sergio0694 22aa752
Fixed a comment
Sergio0694 53982ad
Removed unnecessary using directives
Sergio0694 774ed79
Fixed an incorrect comment
Sergio0694 61248d2
Minor code tweaks
Sergio0694 58f3c64
Added AsyncRelayCommand type
Sergio0694 29daf8e
Added AsyncRelayCommand<T> type
Sergio0694 9c85a3c
Bug fixes in ObservableObject.SetAndNotifyOnCompletion
Sergio0694 61dd57d
Added ICommand<T> interface
Sergio0694 cc93648
Merge branch 'master' into feature/mvvm-apis
Sergio0694 7ea0d31
Code refactoring, removed build warnings
Sergio0694 6e90258
Code refactoring, added the IRelayCommand interface
Sergio0694 3497b58
Minor improvements and code tweaks
Sergio0694 6352082
Code refactoring, minor performance improvements
Sergio0694 a3ada63
Removed unnecessary notnull constraints
Sergio0694 05ef4fa
Minor code style tweaks
Sergio0694 0d80519
Simplified commands namespace structure
Sergio0694 900cc98
Renamed Services namespace to DependencyInjection
Sergio0694 2913e8f
Code style updates
Sergio0694 4128421
Fixed an incorrect using directive
Sergio0694 fdf01e3
Minor performance improvements to the Messenger class
Sergio0694 6bb3d4c
Minor memory improvements to the Messenger class
Sergio0694 d077563
Minor bug fixes
Sergio0694 7e623c0
Added Type2 struct
Sergio0694 1bffb04
Minor code tweaks
Sergio0694 63baa83
Fixed missing cleanup from Messenger.Unsubscribe(object)
Sergio0694 277effc
Fixed missing file headers
Sergio0694 399b10b
Minor API rename for consistency with WinUI
Sergio0694 56dfbaa
Updated project description
Sergio0694 f03dadb
Fixed an incorrect XML docs
Sergio0694 543172e
Renamed Commands folder to Input to follow namespace
Sergio0694 14e216b
Added more Messenger unregistration tests
Sergio0694 7c5928b
Improved IMessenger XML docs
Sergio0694 0bbfe9e
Added more fail tests in unit tests, improved documentation
Sergio0694 34c7c6d
Added more Messenger unit tests
Sergio0694 604cf7a
Improved internal documentation
Sergio0694 295b808
Added IAsyncRelayCommand and IAsyncRelayCommand<T> interfaces
Sergio0694 eab207c
Minor codegen improvement
Sergio0694 d5b8ece
Added nullability notation to command parameters
Sergio0694 97e7ace
Fixed an XML comment
Sergio0694 0655edb
Added nullability attributes for uncostrained T parameters
Sergio0694 9ea2e98
Improved nullability handling in commands
Sergio0694 06139b0
Added TaskExtensions class
Sergio0694 474d72e
Added tests for the TaskExtensions class
Sergio0694 c5f0b59
Added interoperability with IServiceProvider interface
Sergio0694 74cc8dc
Renamed some APIs
Sergio0694 01662e7
Code refactorings
Sergio0694 2c9ec04
Refactored Ioc class to use ASP.NET service provider
Sergio0694 36a819f
Added support for ServiceProviderOptions
Sergio0694 717fb9a
Updated project description
Sergio0694 86d3b49
Ioc optimization, ViewModelBase refactoring
Sergio0694 719e77d
Code refactoring, improved API surface
Sergio0694 dcb059f
Minor code style tweaks
Sergio0694 2f7c49e
Added Set<T> overload with target expression
Sergio0694 468929c
Added ValueChangedMessage<T> type
Sergio0694 f0b5bf0
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 6129c69
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 fdaa307
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 db41e0d
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 6b5c46b
Merge branch 'master2' into feature/mvvm-apis
Sergio0694 d1ae930
Updated multiline comments style
Sergio0694 0b36b21
Added lbugnion/mvvmlight license to ThirdPartyNotices.txt
Sergio0694 84eb856
Added note to refer to the ThirdPartyNotices.txt file
Sergio0694 a86d1c5
Fixed file headers
Sergio0694 0cc2aef
Minor code fixes
Sergio0694 5d6189e
Code refactoring to ObservableObject and ViewModelBase
Sergio0694 0de7441
Enabled ViewModelBase.IsActive broadcast
Sergio0694 fa4b2ef
Added .NET Standard 2.1 target
Sergio0694 24557f9
Added default implementations to IMessenger
Sergio0694 e0199ab
Renamed IMessengerExtensions class
Sergio0694 81c64ff
Copied the Unit type to the extensions class
Sergio0694 015913a
Added new IMessenger extensions
Sergio0694 2a75480
Removed unnecessary interface methods
Sergio0694 f0fb4cb
Removed .NET Standard 2.1 target
Sergio0694 93c653e
Removed original Unit type
Sergio0694 bcf2476
Renamed request extensions file
Sergio0694 672e861
Minor XML docs improvements
Sergio0694 72cff23
Merge branch 'dev/7.0.0' of https://github.com/windows-toolkit/Window…
Sergio0694 7ad0cd7
Merge branch 'windows-toolkit-dev/7.0.0' into feature/mvvm-apis
Sergio0694 99d8806
Moved Mvvm tests to shared project
Sergio0694 d5fbe05
Fixed merge error in 3rd party notices
Sergio0694 283af26
Updated Microsoft.Extensions.DependencyInjection package
Sergio0694 bb97787
Tweaked some XML docs
Sergio0694 65fa303
Added support for proxy fields with LINQ expression
Sergio0694 0b7d0a0
Improved value type parameters when canExecute is not used
Sergio0694 69a9ff3
Code refactoring, improved Request pattern APIs
Sergio0694 7df8a85
Minor API tweaks and comments improvements
Sergio0694 c6b4cb6
Minor bug fix
Sergio0694 121d564
Merge branch 'dev/7.0.0' into feature/mvvm-apis
Sergio0694 ec675df
Updated NuGet packages, tweaked Mvvm .csproj
Sergio0694 50a6095
Removed unnecessary attributes
Sergio0694 9a9aa6b
Added new Set<T> overloads with callback
Sergio0694 f71923e
Deprecated NotifyTaskCompletion<TResult> type
Sergio0694 6ed7b5e
Code refactoring, added TaskResultConverter
Sergio0694 8a7cd06
Added missing XML note about return type
Sergio0694 0c4669b
Moved al messenger-related functionality to ViewModelBase
Sergio0694 ceba0d4
Merge branch 'dev/7.0.0' into feature/mvvm-apis
Sergio0694 f86a79b
Minor code tweak
Sergio0694 3a10a95
Added override support for events in ObservableObject
Sergio0694 ab467ec
Fixed a typo
Sergio0694 60b1a65
Improved nullability annotations
Sergio0694 2d470ea
Added IDictionarySlim<TKey, TValue>.TryRemove API
Sergio0694 5f06cde
Added object base version of TryRemove API
Sergio0694 2876669
Added IDictionarySlim interface
Sergio0694 cf053f6
Added property to track the total handlers
Sergio0694 279a5e9
~17% speedup in Messenger.Send
Sergio0694 8f2bfe2
Removed unnecessary overload
Sergio0694 10cafd5
~88% speedup in Messenger.Send
Sergio0694 849c3dd
Merge pull request #24 from Sergio0694/optimization/faster-messenger
Sergio0694 4ece5a5
Fixed a refactoring typo
Sergio0694 bee9454
Merge branch 'master' into feature/mvvm-apis
azchohfi 6b3bbc0
Fixed merge issue
Sergio0694 e744928
Added tests for TaskExtensions class
Sergio0694 fcaa59e
Fixed a copy-paste error in filename
Sergio0694 95ac72f
Added tests for TaskResultConverter class
Sergio0694 c5669bb
Fixed build error due to [Obsolete] in a unit test
Sergio0694 8fb8a30
Renamed some APIs in RequestMessage<T>
Sergio0694 ce5132f
Merge branch 'master' into feature/mvvm-apis
Sergio0694 05a0b4e
Added AsyncRequestMessage<T> class
Sergio0694 572663f
Added CollectionRequestMessage<T> class
Sergio0694 6923f58
Added AsyncCollectionRequestMessage<T> class
Sergio0694 26e4053
Improved Messenger XML docs
Sergio0694 430ce04
Added unit tests for new request message types
Sergio0694 8a94bcb
Minor bug fixes and code refactoring
Sergio0694 e46a589
Added missing readonly modifier to Unit type
Sergio0694 53ea2f7
Fixed ambiguous match in XML comment
Sergio0694 1179ab1
Minor code style tweaks
Sergio0694 a70f278
Minor code refactoring
Sergio0694 1726279
Updated Task<T>.ResultOrDefault<T> on .NET Standard 2.1
Sergio0694 dc5398a
Merge branch 'master' into feature/mvvm-apis
Sergio0694 7b755a8
Minor tweaks to AsyncCollectionRequestMessage<T>
Sergio0694 4a1ec14
Added GetResponsesAsync API to AsyncCollectionRequestMessage<T>
Sergio0694 573bbad
Fixed a bug in the unit tests
Sergio0694 0fd19a3
Merge branch 'master' into feature/mvvm-apis
michael-hawker c6d65a2
Added ISubscriber<TMessage> interface, new extensions
Sergio0694 1cbe53c
Minor code refactoring
Sergio0694 7fa5994
Added new unit tests, minor bug fixes
Sergio0694 50b55fe
Merge branch 'feature/mvvm-apis' of https://github.com/Sergio0694/Win…
Sergio0694 34af434
Added ViewModelBase test for message unregistration
Sergio0694 53d1a9d
Added more comments to SetAndNotifyOnCompletion
Sergio0694 866dc8c
Improved remarks for ViewModeBase.OnDeactivated
Sergio0694 7da27bc
Improved tests for ISubscriber<T> APIs
Sergio0694 716d31c
Merge branch 'master' into feature/mvvm-apis
Sergio0694 f9165df
Initial code refactoring to SetAndNotifyOnCompletion
Sergio0694 904cd55
Added IsRunning property to async commands
Sergio0694 88f85ab
Added SetAndNotifyOnCompletion overload with callback
Sergio0694 b33b2fa
More code refactoring to SetAndNotifyOnCompletion
Sergio0694 f634006
Fixed an XML doc
Sergio0694 d98c257
Fixed initial IsRunning property update
Sergio0694 b91b218
Added unit tests for AsyncRelayCommand, bug fixes
Sergio0694 62c6829
Merge pull request #25 from Sergio0694/feature/extended-commands
Sergio0694 5725d45
Improved remarks for SetAndNotifyOnCompletion
Sergio0694 2a9d3e5
Improved Test_ObservableObject_Events
Sergio0694 0938168
Tweaked visibility of some test members
Sergio0694 eab9d9a
Added more tests for faulty monitored tasks
Sergio0694 0d423e8
Added more Ioc tests
Sergio0694 e4137b4
Refactored Task result extensions/converter
Sergio0694 8a5b294
Added sealed modifier to DictionarySlim<TKey, TValue>
Sergio0694 eb9d70a
Removed sealed modifier, this was a bad idea
Sergio0694 3032cb1
Renamed some APIs for consistency
Sergio0694 58805a7
Added more comments to DictionarySlim<,> type
Sergio0694 e8016f4
Fixed missing file rename for 3032cb1
Sergio0694 49d2ea1
Renamed ViewModelBase to ObservableRecipient
Sergio0694 8233d7c
Reduced thread contention in Messenger.Unregister<TToken>
Sergio0694 a671902
Fixed a bug in Messenger.Reset
Sergio0694 1123577
Minor code refactoring
Sergio0694 44451f2
Renamed some IMessenger APIs/extensions for clarity
Sergio0694 4094153
Fixed a bug in MessengerExtensions.RegisterAll
Sergio0694 a1ee70e
Minor code style tweaks
Sergio0694 053814e
Added ObservableObject.Set IEqualityComparer<T> overloads
Sergio0694 2b4e666
Major performance/memory boost in RegisterAll
Sergio0694 21e971f
Another perf boost (with compiled LINQ expressions)
Sergio0694 96a2a3f
Merge branch 'master' into feature/mvvm-apis
Sergio0694 ea0b85a
Renamed Set -> SetProperty for consistency with other libs
Sergio0694 4a1a61f
Merge branch 'master' into feature/mvvm-apis
Sergio0694 1542c0e
Removed unnecessary overhead in request messages
Sergio0694 afed416
Merge branch 'master' into feature/mvvm-apis
michael-hawker 1c15e36
Merge remote-tracking branch 'upstream/master' into feature/mvvm-apis
Sergio0694 4238e6e
Code tweaks to support #3293
Sergio0694 cd7a981
Switched property name args to string?
Sergio0694 6c8ddde
Renamed IServiceCollection arg to services
Sergio0694 445d7a5
Changed sender type to object in notification message
Sergio0694 ffefa55
Renamed Task.ResultOrDefault extensions
Sergio0694 ffcc807
Updated package description for ViewModelBase
Sergio0694 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Removed .NET Standard 2.1 target
- Loading branch information
commit f0fb4cbeec63cfc79121ee0dba6172d077f7a1d1
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks> | ||
| <TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
| <LangVersion>8.0</LangVersion> | ||
| <Nullable>enable</Nullable> | ||
| <Title>Windows Community Toolkit Mvvm .NET Standard</Title> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Comment, No Action] We may change this later, having discussion around if we have a 'simple/brand' name for this package? 🙂 |
||
|
|
@@ -19,17 +19,8 @@ | |
| <DebugType>Full</DebugType> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- .NET Standard 2.0 doesn't have the Span<T> types --> | ||
| <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' "> | ||
| <PackageReference Include="System.Memory" Version="4.5.4" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- .NET Standard 2.1 doesn't have the Unsafe class --> | ||
| <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' "> | ||
| <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.1" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="System.Memory" Version="4.5.4" /> | ||
| <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.3" /> | ||
| </ItemGroup> | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.