├── .editorconfig
├── .git-blame-ignore-revs
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── config.yml
│ └── feature_proposal.yml
└── PULL_REQUEST_TEMPLATE.md
├── .runsettings
├── CODE_OF_CONDUCT.md
├── Contributing.md
├── Directory.Build.props
├── Directory.Build.targets
├── License.md
├── README.md
├── ThirdPartyNotices.txt
├── azure-pipelines.yml
├── build
├── Community.Toolkit.Common.props
├── Community.Toolkit.Common.targets
├── Sign-Package.ps1
├── SignClientSettings.json
└── nuget.png
├── dotnet Community Toolkit.sln
├── global.json
├── src
├── CommunityToolkit.Common
│ ├── CommunityToolkit.Common.csproj
│ ├── Converters.cs
│ ├── Deferred
│ │ ├── DeferredCancelEventArgs.cs
│ │ ├── DeferredEventArgs.cs
│ │ └── EventDeferral.cs
│ ├── Extensions
│ │ ├── ArrayExtensions.cs
│ │ ├── EventHandlerExtensions.cs
│ │ ├── ISettingsStorageHelperExtensions.cs
│ │ ├── StringExtensions.cs
│ │ └── TaskExtensions.cs
│ ├── Helpers
│ │ └── ObjectStorage
│ │ │ ├── DirectoryItemType.cs
│ │ │ ├── IFileStorageHelper.cs
│ │ │ ├── IObjectSerializer.cs
│ │ │ ├── ISettingsStorageHelper.cs
│ │ │ └── SystemSerializer.cs
│ └── IncrementalLoadingCollection
│ │ └── IIncrementalSource.cs
├── CommunityToolkit.Diagnostics
│ ├── CommunityToolkit.Diagnostics.csproj
│ ├── Extensions
│ │ ├── TypeExtensions.cs
│ │ └── ValueTypeExtensions.cs
│ ├── Generated
│ │ ├── Guard.Collection.g.cs
│ │ ├── Guard.Collection.tt
│ │ ├── Guard.Comparable.Numeric.g.cs
│ │ ├── Guard.Comparable.Numeric.tt
│ │ ├── Guard.md
│ │ ├── ThrowHelper.Collection.g.cs
│ │ ├── ThrowHelper.Collection.tt
│ │ ├── TypeInfo.g.cs
│ │ └── TypeInfo.ttinclude
│ ├── Guard.Boolean.cs
│ ├── Guard.Comparable.Generic.cs
│ ├── Guard.Comparable.Numeric.cs
│ ├── Guard.IO.cs
│ ├── Guard.String.cs
│ ├── Guard.Tasks.cs
│ ├── Guard.cs
│ ├── Internals
│ │ ├── Guard.Collection.Generic.ThrowHelper.cs
│ │ ├── Guard.Comparable.Generic.ThrowHelper.cs
│ │ ├── Guard.Comparable.Numeric.ThrowHelper.cs
│ │ ├── Guard.IO.ThrowHelper.cs
│ │ ├── Guard.String.ThrowHelper.cs
│ │ ├── Guard.Tasks.ThrowHelper.cs
│ │ └── Guard.ThrowHelper.cs
│ ├── ThrowHelper.Generic.cs
│ └── ThrowHelper.cs
├── CommunityToolkit.HighPerformance
│ ├── Box{T}.cs
│ ├── Buffers
│ │ ├── ArrayPoolBufferWriter{T}.cs
│ │ ├── Enums
│ │ │ └── AllocationMode.cs
│ │ ├── Interfaces
│ │ │ └── IBuffer{T}.cs
│ │ ├── Internals
│ │ │ ├── ArrayMemoryManager{TFrom,TTo}.cs
│ │ │ ├── Interfaces
│ │ │ │ └── IMemoryManager.cs
│ │ │ ├── ProxyMemoryManager{TFrom,TTo}.cs
│ │ │ ├── RawObjectMemoryManager{T}.cs
│ │ │ └── StringMemoryManager{TTo}.cs
│ │ ├── MemoryBufferWriter{T}.cs
│ │ ├── MemoryOwner{T}.cs
│ │ ├── SpanOwner{T}.cs
│ │ ├── StringPool.cs
│ │ └── Views
│ │ │ └── MemoryDebugView{T}.cs
│ ├── CommunityToolkit.HighPerformance.csproj
│ ├── Enumerables
│ │ ├── ReadOnlyRefEnumerable{T}.cs
│ │ ├── ReadOnlySpanEnumerable{T}.cs
│ │ ├── ReadOnlySpanTokenizer{T}.cs
│ │ ├── RefEnumerable{T}.cs
│ │ ├── SpanEnumerable{T}.cs
│ │ └── SpanTokenizer{T}.cs
│ ├── Extensions
│ │ ├── ArrayExtensions.1D.cs
│ │ ├── ArrayExtensions.2D.cs
│ │ ├── ArrayExtensions.3D.cs
│ │ ├── ArrayPoolBufferWriterExtensions.cs
│ │ ├── ArrayPoolExtensions.cs
│ │ ├── BoolExtensions.cs
│ │ ├── HashCodeExtensions.cs
│ │ ├── IBufferWriterExtensions.cs
│ │ ├── IMemoryOwnerExtensions.cs
│ │ ├── ListExtensions.cs
│ │ ├── MemoryExtensions.cs
│ │ ├── NullableExtensions.cs
│ │ ├── ReadOnlyMemoryExtensions.cs
│ │ ├── ReadOnlySequenceExtensions.cs
│ │ ├── ReadOnlySpanExtensions.cs
│ │ ├── SpanExtensions.cs
│ │ ├── SpinLockExtensions.cs
│ │ ├── StreamExtensions.cs
│ │ └── StringExtensions.cs
│ ├── Helpers
│ │ ├── BitHelper.cs
│ │ ├── HashCode{T}.cs
│ │ ├── Internals
│ │ │ ├── BitOperations.cs
│ │ │ ├── RefEnumerableHelper.cs
│ │ │ ├── RuntimeHelpers.cs
│ │ │ ├── SpanHelper.Count.cs
│ │ │ └── SpanHelper.Hash.cs
│ │ ├── ObjectMarshal.cs
│ │ ├── ParallelHelper.For.IAction.cs
│ │ ├── ParallelHelper.For.IAction2D.cs
│ │ ├── ParallelHelper.ForEach.IInAction.cs
│ │ ├── ParallelHelper.ForEach.IInAction2D.cs
│ │ ├── ParallelHelper.ForEach.IRefAction.cs
│ │ ├── ParallelHelper.ForEach.IRefAction2D.cs
│ │ └── ParallelHelper.ThrowExceptions.cs
│ ├── Memory
│ │ ├── Internals
│ │ │ ├── OverflowHelper.cs
│ │ │ └── ThrowHelper.cs
│ │ ├── Memory2D{T}.cs
│ │ ├── ReadOnlyMemory2D{T}.cs
│ │ ├── ReadOnlySpan2D{T}.Enumerator.cs
│ │ ├── ReadOnlySpan2D{T}.cs
│ │ ├── Span2D{T}.Enumerator.cs
│ │ ├── Span2D{T}.cs
│ │ └── Views
│ │ │ └── MemoryDebugView2D{T}.cs
│ ├── NullableReadOnlyRef{T}.cs
│ ├── NullableRef{T}.cs
│ ├── ReadOnlyRef{T}.cs
│ ├── Ref{T}.cs
│ └── Streams
│ │ ├── IBufferWriterStream{TWriter}.Memory.cs
│ │ ├── IBufferWriterStream{TWriter}.cs
│ │ ├── IMemoryOwnerStream{TSource}.cs
│ │ ├── MemoryStream.ThrowExceptions.cs
│ │ ├── MemoryStream.Validate.cs
│ │ ├── MemoryStream.cs
│ │ ├── MemoryStream{TSource}.Memory.cs
│ │ ├── MemoryStream{TSource}.cs
│ │ ├── ReadOnlySequenceStream.cs
│ │ └── Sources
│ │ ├── ArrayBufferWriterOwner.cs
│ │ ├── ArrayOwner.cs
│ │ ├── IBufferWriterOwner.cs
│ │ ├── Interfaces
│ │ └── ISpanOwner.cs
│ │ └── MemoryManagerOwner.cs
├── CommunityToolkit.Mvvm.CodeFixers.Roslyn4001
│ └── CommunityToolkit.Mvvm.CodeFixers.Roslyn4001.csproj
├── CommunityToolkit.Mvvm.CodeFixers.Roslyn4120
│ └── CommunityToolkit.Mvvm.CodeFixers.Roslyn4120.csproj
├── CommunityToolkit.Mvvm.CodeFixers
│ ├── AsyncVoidReturningRelayCommandMethodCodeFixer.cs
│ ├── ClassUsingAttributeInsteadOfInheritanceCodeFixer.cs
│ ├── CommunityToolkit.Mvvm.CodeFixers.projitems
│ ├── CommunityToolkit.Mvvm.CodeFixers.props
│ ├── CommunityToolkit.Mvvm.CodeFixers.shproj
│ ├── FieldReferenceForObservablePropertyFieldCodeFixer.cs
│ ├── UsePartialPropertyForObservablePropertyCodeFixer.cs
│ └── UsePartialPropertyForSemiAutoPropertyCodeFixer.cs
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001
│ └── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.csproj
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031
│ └── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031.csproj
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120
│ └── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120.csproj
├── CommunityToolkit.Mvvm.SourceGenerators
│ ├── AnalyzerReleases.Shipped.md
│ ├── AnalyzerReleases.Unshipped.md
│ ├── CommunityToolkit.Mvvm.SourceGenerators.projitems
│ ├── CommunityToolkit.Mvvm.SourceGenerators.props
│ ├── CommunityToolkit.Mvvm.SourceGenerators.shproj
│ ├── ComponentModel
│ │ ├── INotifyPropertyChangedGenerator.cs
│ │ ├── Models
│ │ │ ├── AttributeInfo.cs
│ │ │ ├── INotifyPropertyChangedInfo.cs
│ │ │ ├── ObservableRecipientInfo.cs
│ │ │ ├── PropertyInfo.cs
│ │ │ ├── TypedConstantInfo.Factory.cs
│ │ │ ├── TypedConstantInfo.cs
│ │ │ └── ValidationInfo.cs
│ │ ├── ObservableObjectGenerator.cs
│ │ ├── ObservablePropertyGenerator.Execute.cs
│ │ ├── ObservablePropertyGenerator.cs
│ │ ├── ObservableRecipientGenerator.cs
│ │ ├── ObservableValidatorValidateAllPropertiesGenerator.Execute.cs
│ │ ├── ObservableValidatorValidateAllPropertiesGenerator.cs
│ │ ├── TransitiveMembersGenerator.Execute.cs
│ │ └── TransitiveMembersGenerator.cs
│ ├── Diagnostics
│ │ ├── Analyzers
│ │ │ ├── AsyncVoidReturningRelayCommandMethodAnalyzer.cs
│ │ │ ├── AutoPropertyWithFieldTargetedObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── ClassUsingAttributeInsteadOfInheritanceAnalyzer.cs
│ │ │ ├── FieldReferenceForObservablePropertyFieldAnalyzer.cs
│ │ │ ├── FieldWithOrphanedDependentObservablePropertyAttributesAnalyzer.cs
│ │ │ ├── InvalidClassLevelNotifyDataErrorInfoAttributeAnalyzer.cs
│ │ │ ├── InvalidClassLevelNotifyPropertyChangedRecipientsAttributeAnalyzer.cs
│ │ │ ├── InvalidGeneratedPropertyObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── InvalidPartialPropertyLevelObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── InvalidPointerTypeObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── InvalidPropertyLevelObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── InvalidTargetObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── PropertyNameCollisionObservablePropertyAttributeAnalyzer.cs
│ │ │ ├── RequiresCSharpLanguageVersionPreviewAnalyzer.cs
│ │ │ ├── UnsupportedCSharpLanguageVersionAnalyzer.cs
│ │ │ ├── UnsupportedRoslynVersionForPartialPropertyAnalyzer.cs
│ │ │ ├── UseObservablePropertyOnPartialPropertyAnalyzer.cs
│ │ │ ├── UseObservablePropertyOnSemiAutoPropertyAnalyzer.cs
│ │ │ ├── WinRTClassUsingNotifyPropertyChangedAttributesAnalyzer.cs
│ │ │ ├── WinRTGeneratedBindableCustomPropertyWithBasesMemberAnalyzer.cs
│ │ │ ├── WinRTObservablePropertyOnFieldsIsNotAotCompatibleAnalyzer.cs
│ │ │ └── WinRTRelayCommandIsNotGeneratedBindableCustomPropertyCompatibleAnalyzer.cs
│ │ ├── DiagnosticDescriptors.cs
│ │ ├── SuppressionDescriptors.cs
│ │ └── Suppressors
│ │ │ ├── ObservablePropertyAttributeWithSupportedTargetDiagnosticSuppressor.cs
│ │ │ └── RelayCommandAttributeWithFieldOrPropertyTargetDiagnosticSuppressor.cs
│ ├── EmbeddedResources
│ │ ├── INotifyPropertyChanged.cs
│ │ ├── ObservableObject.cs
│ │ └── ObservableRecipient.cs
│ ├── Extensions
│ │ ├── AccessibilityExtensions.cs
│ │ ├── AnalyzerConfigOptionsExtensions.cs
│ │ ├── AttributeDataExtensions.cs
│ │ ├── CompilationExtensions.cs
│ │ ├── DiagnosticsExtensions.cs
│ │ ├── GeneratorAttributeSyntaxContextWithOptions.cs
│ │ ├── INamedTypeSymbolExtensions.cs
│ │ ├── ISymbolExtensions.cs
│ │ ├── ITypeSymbolExtensions.cs
│ │ ├── IncrementalGeneratorInitializationContextExtensions.cs
│ │ ├── IncrementalValuesProviderExtensions.cs
│ │ ├── MemberDeclarationSyntaxExtensions.cs
│ │ ├── MethodDeclarationSyntaxExtensions.cs
│ │ ├── SourceProductionContextExtensions.cs
│ │ ├── SymbolInfoExtensions.cs
│ │ ├── SymbolKindExtensions.cs
│ │ ├── SyntaxKindExtensions.cs
│ │ ├── SyntaxNodeExtensions.cs
│ │ ├── SyntaxTokenExtensions.cs
│ │ ├── SyntaxTokenListExtensions.cs
│ │ └── TypeDeclarationSyntaxExtensions.cs
│ ├── Helpers
│ │ ├── EquatableArray{T}.cs
│ │ ├── HashCode.cs
│ │ ├── ImmutableArrayBuilder{T}.cs
│ │ └── ObjectPool{T}.cs
│ ├── Input
│ │ ├── Models
│ │ │ ├── CanExecuteExpressionType.cs
│ │ │ └── CommandInfo.cs
│ │ ├── RelayCommandGenerator.Execute.cs
│ │ └── RelayCommandGenerator.cs
│ ├── Messaging
│ │ ├── IMessengerRegisterAllGenerator.Execute.cs
│ │ ├── IMessengerRegisterAllGenerator.cs
│ │ └── Models
│ │ │ └── RecipientInfo.cs
│ ├── Models
│ │ ├── DiagnosticInfo.cs
│ │ ├── HierarchyInfo.Syntax.cs
│ │ ├── HierarchyInfo.cs
│ │ ├── Result.cs
│ │ └── TypeInfo.cs
│ └── Polyfills
│ │ ├── GeneratorAttributeSyntaxContext.cs
│ │ └── SyntaxValueProviderExtensions.cs
├── CommunityToolkit.Mvvm
│ ├── Collections
│ │ ├── IReadOnlyObservableGroup.cs
│ │ ├── IReadOnlyObservableGroup{TKey,TElement}.cs
│ │ ├── IReadOnlyObservableGroup{TKey}.cs
│ │ ├── Internals
│ │ │ └── ObservableGroupHelper.cs
│ │ ├── ObservableGroupedCollectionExtensions.cs
│ │ ├── ObservableGroupedCollection{TKey,TElement}.cs
│ │ ├── ObservableGroup{TKey,TElement}.cs
│ │ ├── ReadOnlyObservableGroupedCollection{TKey,TElement}.cs
│ │ └── ReadOnlyObservableGroup{TKey,TElement}.cs
│ ├── CommunityToolkit.Mvvm.FeatureSwitches.targets
│ ├── CommunityToolkit.Mvvm.SourceGenerators.targets
│ ├── CommunityToolkit.Mvvm.Windows.targets
│ ├── CommunityToolkit.Mvvm.WindowsSdk.targets
│ ├── CommunityToolkit.Mvvm.csproj
│ ├── CommunityToolkit.Mvvm.targets
│ ├── ComponentModel
│ │ ├── Attributes
│ │ │ ├── INotifyPropertyChangedAttribute.cs
│ │ │ ├── NotifyCanExecuteChangedForAttribute.cs
│ │ │ ├── NotifyDataErrorInfoAttribute.cs
│ │ │ ├── NotifyPropertyChangedForAttribute.cs
│ │ │ ├── NotifyPropertyChangedRecipientsAttribute.cs
│ │ │ ├── ObservableObjectAttribute.cs
│ │ │ ├── ObservablePropertyAttribute.cs
│ │ │ └── ObservableRecipientAttribute.cs
│ │ ├── ObservableObject.cs
│ │ ├── ObservableRecipient.cs
│ │ ├── ObservableValidator.cs
│ │ └── __Internals
│ │ │ ├── __ObservableValidatorHelper.cs
│ │ │ └── __TaskExtensions.cs
│ ├── DependencyInjection
│ │ └── Ioc.cs
│ ├── Input
│ │ ├── AsyncRelayCommand.cs
│ │ ├── AsyncRelayCommandOptions.cs
│ │ ├── AsyncRelayCommand{T}.cs
│ │ ├── Attributes
│ │ │ └── RelayCommandAttribute.cs
│ │ ├── IAsyncRelayCommandExtensions.cs
│ │ ├── Interfaces
│ │ │ ├── IAsyncRelayCommand.cs
│ │ │ ├── IAsyncRelayCommand{T}.cs
│ │ │ ├── IRelayCommand.cs
│ │ │ └── IRelayCommand{T}.cs
│ │ ├── Internals
│ │ │ ├── CancelCommand.cs
│ │ │ ├── DisabledCommand.cs
│ │ │ └── ICancellationAwareCommand.cs
│ │ ├── RelayCommand.cs
│ │ └── RelayCommand{T}.cs
│ ├── Messaging
│ │ ├── IMessenger.cs
│ │ ├── IMessengerExtensions.Observables.cs
│ │ ├── IMessengerExtensions.cs
│ │ ├── IRecipient{TMessage}.cs
│ │ ├── Internals
│ │ │ ├── ArrayPoolBufferWriter{T}.cs
│ │ │ ├── MessageHandlerDispatcher.cs
│ │ │ ├── System
│ │ │ │ ├── Collections.Generic
│ │ │ │ │ ├── Dictionary2.cs
│ │ │ │ │ ├── HashHelpers.cs
│ │ │ │ │ ├── IDictionary2.cs
│ │ │ │ │ ├── IDictionary2{TKey,TValue}.cs
│ │ │ │ │ └── IDictionary2{TKey}.cs
│ │ │ │ ├── Gen2GcCallback.cs
│ │ │ │ └── Runtime.CompilerServices
│ │ │ │ │ ├── ConditionalWeakTable2{TKey,TValue}.Proxy.cs
│ │ │ │ │ ├── ConditionalWeakTable2{TKey,TValue}.ZeroAlloc.cs
│ │ │ │ │ ├── ConditionalWeakTable2{TKey,TValue}.cs
│ │ │ │ │ └── ConditionalWeakTableExtensions.cs
│ │ │ ├── Type2.cs
│ │ │ └── Unit.cs
│ │ ├── MessageHandler{TRecipient,TMessage}.cs
│ │ ├── Messages
│ │ │ ├── AsyncCollectionRequestMessage{T}.cs
│ │ │ ├── AsyncRequestMessage{T}.cs
│ │ │ ├── CollectionRequestMessage{T}.cs
│ │ │ ├── PropertyChangedMessage{T}.cs
│ │ │ ├── RequestMessage{T}.cs
│ │ │ └── ValueChangedMessage{T}.cs
│ │ ├── StrongReferenceMessenger.cs
│ │ └── WeakReferenceMessenger.cs
│ └── Properties
│ │ ├── FeatureSwitches.cs
│ │ ├── ILLink.Substitutions.xml
│ │ └── Polyfills
│ │ └── ArgumentNullException.cs
├── Directory.Build.props
└── Directory.Build.targets
├── tests
├── CommunityToolkit.Common.UnitTests
│ ├── CommunityToolkit.Common.UnitTests.csproj
│ ├── Extensions
│ │ ├── Test_ArrayExtensions.cs
│ │ ├── Test_EventHandlerExtensions.cs
│ │ └── Test_TaskExtensions.cs
│ └── Test_Converters.cs
├── CommunityToolkit.Diagnostics.UnitTests
│ ├── CommunityToolkit.Diagnostics.UnitTests.csproj
│ ├── Extensions
│ │ ├── Test_TypeExtensions.cs
│ │ └── Test_ValueTypeExtensions.cs
│ ├── Test_Guard.Array.cs
│ ├── Test_Guard.Comparable.Numeric.cs
│ ├── Test_Guard.cs
│ └── Test_ThrowHelper.cs
├── CommunityToolkit.HighPerformance.UnitTests
│ ├── Buffers
│ │ ├── Internals
│ │ │ ├── TrackingArrayPool{T}.cs
│ │ │ └── UnmanagedSpanOwner.cs
│ │ ├── Test_ArrayPoolBufferWriter{T}.cs
│ │ ├── Test_MemoryBufferWriter{T}.cs
│ │ ├── Test_MemoryOwner{T}.cs
│ │ ├── Test_SpanOwner{T}.cs
│ │ └── Test_StringPool.cs
│ ├── CommunityToolkit.HighPerformance.UnitTests.csproj
│ ├── Enumerables
│ │ ├── Test_ReadOnlyRefEnumerable{T}.cs
│ │ └── Test_RefEnumerable{T}.cs
│ ├── Extensions
│ │ ├── Test_ArrayExtensions.1D.cs
│ │ ├── Test_ArrayExtensions.2D.cs
│ │ ├── Test_ArrayExtensions.3D.cs
│ │ ├── Test_ArrayPoolExtensions.cs
│ │ ├── Test_BoolExtensions.cs
│ │ ├── Test_HashCodeExtensions.cs
│ │ ├── Test_IBufferWriterExtensions.cs
│ │ ├── Test_IMemoryOwnerExtensions.cs
│ │ ├── Test_MemoryExtensions.cs
│ │ ├── Test_NullableExtensions.cs
│ │ ├── Test_ReadOnlyMemoryExtensions.cs
│ │ ├── Test_ReadOnlySpanExtensions.Count.cs
│ │ ├── Test_ReadOnlySpanExtensions.cs
│ │ ├── Test_SpanExtensions.cs
│ │ ├── Test_SpinLockExtensions.cs
│ │ ├── Test_StreamExtensions.cs
│ │ └── Test_StringExtensions.cs
│ ├── Helpers
│ │ ├── Internals
│ │ │ └── Test_RuntimeHelpers.cs
│ │ ├── Test_BitHelper.cs
│ │ ├── Test_HashCode{T}.cs
│ │ ├── Test_ObjectMarshal.cs
│ │ ├── Test_ParallelHelper.For.cs
│ │ ├── Test_ParallelHelper.For2D.cs
│ │ ├── Test_ParallelHelper.ForEach.In.cs
│ │ ├── Test_ParallelHelper.ForEach.In2D.cs
│ │ ├── Test_ParallelHelper.ForEach.Ref.cs
│ │ ├── Test_ParallelHelper.ForEach.Ref2D.cs
│ │ └── Test_ParallelHelper.ThrowExceptions.cs
│ ├── Memory
│ │ ├── Test_Memory2D{T}.cs
│ │ ├── Test_ReadOnlyMemory2D{T}.cs
│ │ ├── Test_ReadOnlySpan2D{T}.cs
│ │ └── Test_Span2D{T}.cs
│ ├── Streams
│ │ ├── Test_IBufferWriterStream.cs
│ │ ├── Test_IMemoryOwnerStream.cs
│ │ ├── Test_MemoryStream.ThrowExceptions.cs
│ │ ├── Test_MemoryStream.cs
│ │ └── Test_ReadOnlySequenceStream.cs
│ ├── Test_Box{T}.cs
│ ├── Test_NullableReadOnlyRef{T}.cs
│ ├── Test_NullableRef{T}.cs
│ ├── Test_ReadOnlyRef{T}.cs
│ └── Test_Ref{T}.cs
├── CommunityToolkit.Mvvm.DisableINotifyPropertyChanging.UnitTests
│ ├── CommunityToolkit.Mvvm.DisableINotifyPropertyChanging.UnitTests.csproj
│ └── Test_DisableINotifyPropertyChanging.cs
├── CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4001
│ └── CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4001.csproj
├── CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4031
│ └── CommunityToolkit.Mvvm.ExternalAssembly.Roslyn4031.csproj
├── CommunityToolkit.Mvvm.ExternalAssembly
│ ├── CommunityToolkit.Mvvm.ExternalAssembly.projitems
│ ├── CommunityToolkit.Mvvm.ExternalAssembly.shproj
│ ├── ModelWithObservableObjectAttribute.cs
│ ├── ModelWithObservablePropertyAndMethod.cs
│ └── SampleModelWithINPCAndObservableProperties.cs
├── CommunityToolkit.Mvvm.Internals.UnitTests
│ ├── CommunityToolkit.Mvvm.Internals.UnitTests.csproj
│ ├── Test_ConditionalWeakTable2.cs
│ ├── Test_Dictionary2.cs
│ └── Test_Messenger.cs
├── CommunityToolkit.Mvvm.Roslyn4001.UnitTests
│ └── CommunityToolkit.Mvvm.Roslyn4001.UnitTests.csproj
├── CommunityToolkit.Mvvm.Roslyn4031.UnitTests
│ └── CommunityToolkit.Mvvm.Roslyn4031.UnitTests.csproj
├── CommunityToolkit.Mvvm.Roslyn4120.UnitTests
│ ├── CommunityToolkit.Mvvm.Roslyn4120.UnitTests.csproj
│ └── Test_ObservablePropertyAttribute_PartialProperties.cs
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.UnitTests
│ ├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4001.UnitTests.csproj
│ ├── Test_AsyncVoidReturningRelayCommandMethodCodeFixer.cs
│ ├── Test_ClassUsingAttributeInsteadOfInheritanceCodeFixer.cs
│ ├── Test_FieldReferenceForObservablePropertyFieldCodeFixer.cs
│ └── Test_UnsupportedRoslynVersionForPartialPropertyAnalyzer.cs
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031.UnitTests
│ └── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4031.UnitTests.csproj
├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120.UnitTests
│ ├── CommunityToolkit.Mvvm.SourceGenerators.Roslyn4120.UnitTests.csproj
│ ├── Test_SourceGeneratorsCodegen.cs
│ ├── Test_SourceGeneratorsDiagnostics.cs
│ ├── Test_UseObservablePropertyOnSemiAutoPropertyCodeFixer.cs
│ └── Test_UsePartialPropertyForObservablePropertyCodeFixer.cs
├── CommunityToolkit.Mvvm.SourceGenerators.UnitTests
│ ├── CommunityToolkit.Mvvm.SourceGenerators.UnitTests.projitems
│ ├── CommunityToolkit.Mvvm.SourceGenerators.UnitTests.shproj
│ ├── Helpers
│ │ ├── CSharpAnalyzerWithLanguageVersionTest{TAnalyzer}.cs
│ │ └── CSharpCodeFixWithLanguageVersionTest{TAnalyzer,TCodeFix,TVerifier}.cs
│ ├── Test_SourceGeneratorsCodegen.cs
│ └── Test_SourceGeneratorsDiagnostics.cs
└── CommunityToolkit.Mvvm.UnitTests
│ ├── Collections
│ ├── IntGroup.cs
│ ├── Test_ObservableGroup.cs
│ ├── Test_ObservableGroupedCollection.cs
│ ├── Test_ObservableGroupedCollectionExtensions.cs
│ ├── Test_ReadOnlyObservableGroup.cs
│ └── Test_ReadOnlyObservableGroupedCollection.cs
│ ├── CommunityToolkit.Mvvm.UnitTests.projitems
│ ├── CommunityToolkit.Mvvm.UnitTests.shproj
│ ├── Helpers
│ ├── ExceptionHelper.cs
│ └── TaskSchedulerTestHelper.cs
│ ├── Test_ArgumentNullException.ComponentModel.cs
│ ├── Test_ArgumentNullException.DependencyInjection.cs
│ ├── Test_ArgumentNullException.Input.cs
│ ├── Test_ArgumentNullException.Messaging.cs
│ ├── Test_AsyncRelayCommand.cs
│ ├── Test_AsyncRelayCommand{T}.cs
│ ├── Test_INotifyPropertyChangedAttribute.cs
│ ├── Test_IRecipientGenerator.cs
│ ├── Test_Messenger.Observables.cs
│ ├── Test_Messenger.Request.cs
│ ├── Test_Messenger.cs
│ ├── Test_ObservableObject.cs
│ ├── Test_ObservableObjectAttribute.cs
│ ├── Test_ObservablePropertyAttribute.RootNamespace.cs
│ ├── Test_ObservablePropertyAttribute.cs
│ ├── Test_ObservableRecipient.cs
│ ├── Test_ObservableRecipientAttribute.cs
│ ├── Test_ObservableValidator.cs
│ ├── Test_RelayCommand.cs
│ ├── Test_RelayCommandAttribute.cs
│ ├── Test_RelayCommand{T}.cs
│ └── Test_SourceGenerators.cs
├── toolkit.snk
└── version.json
/.git-blame-ignore-revs:
--------------------------------------------------------------------------------
1 | # Whitespace fixups
2 | eab4b9ed28c27db0c4194478eaa7c6e91664195d
3 | 93cb82a0d01bcf3feb2a79cc1eaf2d47b3c0cdd4
4 |
5 | # Switch to file-scoped namespaces
6 | c176080d37953a2d811c81181192acc8695bbf73
7 |
8 | # Fix leftover file-scoped namespaces
9 | 0693d6c9647c8bea852de8f670e6c32516b18228
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
2 | contact_links:
3 | - name: Question or discussion
4 | url: https://github.com/CommunityToolkit/dotnet/discussions/new
5 | about: I have a question about how to use something in the toolkit
6 | - name: Documentation
7 | url: https://github.com/MicrosoftDocs/CommunityToolkit/issues/new
8 | about: I have a documentation suggestion or question
--------------------------------------------------------------------------------
/.runsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 | 0
4 |
5 | 0
6 | ClassLevel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Directory.Build.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildThisFileDirectory)
5 | $(RepositoryDirectory)build\
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | true
14 | $(RepositoryDirectory)bin\nupkg
15 | true
16 |
17 |
18 |
19 |
20 | false
21 | false
22 | $(NoWarn);CS8002;SA0001
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | true
36 |
37 | true
38 |
39 | $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <_Parameter1>CommitHash
9 | <_Parameter2>$(SourceRevisionId)
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/License.md:
--------------------------------------------------------------------------------
1 | # .NET Community Toolkit
2 |
3 | Copyright © .NET Foundation and Contributors
4 |
5 | All rights reserved.
6 |
7 | ## MIT License (MIT)
8 |
9 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | trigger:
2 | - main
3 | - dev/*
4 | - rel/*
5 |
6 | pr:
7 | - main
8 | - dev/*
9 | - rel/*
10 |
11 | pool:
12 | vmImage: windows-latest
13 |
14 | variables:
15 | Build.Configuration: Release
16 |
17 | jobs:
18 | - job: BuildBits
19 | displayName: Build and Test solution
20 | timeoutInMinutes: 60
21 | steps:
22 |
23 | # Set Build Version
24 | - script: nbgv cloud
25 | displayName: Set NBGV version
26 |
27 | # Restore solution
28 | - script: dotnet restore -p:Configuration=$(Build.Configuration)
29 | displayName: Restore solution
30 |
31 | # Build solution
32 | - script: dotnet build --no-restore -c $(Build.Configuration)
33 | displayName: Build solution
34 |
35 | # Test solution #
36 |
37 | # Run .NET 8 unit tests
38 | - script: dotnet test --no-build -c $(Build.Configuration) -f net8.0 -l "trx;LogFileName=VSTestResults_net8.0.trx"
39 | displayName: Run .NET 8 unit tests
40 |
41 | # Run .NET 7 unit tests
42 | - script: dotnet test --no-build -c $(Build.Configuration) -f net7.0 -l "trx;LogFileName=VSTestResults_net7.0.trx"
43 | displayName: Run .NET 7 unit tests
44 |
45 | # Run .NET Framework 4.7.2 unit tests
46 | - script: dotnet test --no-build -c $(Build.Configuration) -f net472 -l "trx;LogFileName=VSTestResults_net472.trx"
47 | displayName: Run .NET Framework 4.7.2 unit tests
48 |
49 | # Publish test results
50 | - task: PublishTestResults@2
51 | displayName: Publish test results
52 | inputs:
53 | testResultsFormat: VSTest
54 | testResultsFiles: '**/TestResults/VSTestResults*.trx'
55 | condition: always()
56 |
57 | # Pack solution
58 | - script: dotnet pack --no-build -c $(Build.Configuration)
59 | displayName: Pack solution
60 |
61 | # Sign packages
62 | - pwsh: build/Sign-Package.ps1
63 | displayName: Authenticode sign packages
64 | env:
65 | SignClientUser: $(SignClientUser)
66 | SignClientSecret: $(SignClientSecret)
67 | ArtifactDirectory: bin/nupkg
68 | condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'), ne(variables['SignClientUser'], ''), ne(variables['SignClientSecret'], ''))
69 |
70 | # Publish build artifacts
71 | - publish: bin/nupkg
72 | artifact: Packages
73 | displayName: Publish package artifacts
74 |
--------------------------------------------------------------------------------
/build/Community.Toolkit.Common.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microsoft
5 | Microsoft
6 | .NET Community Toolkit
7 | dotnet;Community;Toolkit
8 | MIT
9 | true
10 | (c) .NET Foundation and Contributors. All rights reserved.
11 | https://github.com/CommunityToolkit/dotnet
12 | https://github.com/CommunityToolkit/dotnet/releases
13 | Icon.png
14 | https://raw.githubusercontent.com/CommunityToolkit/dotnet/main/build/nuget.png
15 |
16 |
17 |
18 | true
19 |
20 |
21 |
22 | true
23 | 12.0
24 | enable
25 |
26 |
31 | $(NoWarn);CS8500
32 |
33 |
34 |
35 | true
36 | $(RepositoryDirectory)toolkit.snk
37 | 002400000480000094000000060200000024000052534131000400000100010041753AF735AE6140C9508567666C51C6AB929806ADB0D210694B30AB142A060237BC741F9682E7D8D4310364B4BBA4EE89CC9D3D5CE7E5583587E8EA44DCA09977996582875E71FB54FA7B170798D853D5D8010B07219633BDB761D01AC924DA44576D6180CDCEAE537973982BB461C541541D58417A3794E34F45E6F2D129E2
38 |
39 |
40 |
41 | $(MSBuildProjectName.Contains('Test'))
42 | False
43 | True
44 |
45 |
46 |
47 | true
48 | true
49 | $(TF_BUILD)
50 |
51 |
52 |
--------------------------------------------------------------------------------
/build/Community.Toolkit.Common.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(Product) Asset
5 |
6 |
7 |
8 | $(CommonTags);.NET
9 | $(CommonTags);$(PackageTags)
10 | $(CommonTags)
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/build/Sign-Package.ps1:
--------------------------------------------------------------------------------
1 |
2 | $currentDirectory = split-path $MyInvocation.MyCommand.Definition
3 |
4 | # See if we have the ClientSecret available
5 | if ([string]::IsNullOrEmpty($Env:SignClientSecret)) {
6 | Write-Host "Client Secret not found, not signing packages"
7 | return;
8 | }
9 |
10 | dotnet tool install --tool-path . SignClient
11 |
12 | # Setup Variables we need to pass into the sign client tool
13 |
14 | $appSettings = "$currentDirectory\SignClientSettings.json"
15 |
16 | $nupkgs = Get-ChildItem $Env:ArtifactDirectory\*.nupkg -recurse | Select-Object -ExpandProperty FullName
17 |
18 | foreach ($nupkg in $nupkgs) {
19 | Write-Host "Submitting $nupkg for signing"
20 |
21 | .\SignClient 'sign' -c $appSettings -i $nupkg -r $Env:SignClientUser -s $Env:SignClientSecret -n '.NET Community Toolkit' -d '.NET Community Toolkit' -u 'https://developer.microsoft.com/en-us/windows/uwp-community-toolkit'
22 | if ($LASTEXITCODE -ne 0) {
23 | exit 1
24 | }
25 | Write-Host "Finished signing $nupkg"
26 | }
27 |
28 | Write-Host "Sign-package complete"
--------------------------------------------------------------------------------
/build/SignClientSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "SignClient": {
3 | "AzureAd": {
4 | "AADInstance": "https://login.microsoftonline.com/",
5 | "ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
6 | "TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
7 | },
8 | "Service": {
9 | "Url": "https://codesign.dotnetfoundation.org/",
10 | "ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/build/nuget.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CommunityToolkit/dotnet/657c6971a8d42655c648336b781639ed96c2c49f/build/nuget.png
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "9.0.100",
4 | "rollForward": "latestFeature",
5 | "allowPrerelease": false
6 | }
7 | }
--------------------------------------------------------------------------------
/src/CommunityToolkit.Common/CommunityToolkit.Common.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0;netstandard2.1;net8.0
5 |
6 |
7 |
8 | .NET Community Toolkit - Common
9 |
10 | This package includes .NET helpers such as:
11 | - IncrementalLoadingCollection: Simplifies the definition and usage of collections whose items can be loaded incrementally only when needed by the view.
12 | - String extensions and array extensions: These extensions make working with string and arrays easier.
13 |
14 | Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;Extensions;Helpers
15 |
16 |
17 |
18 |
19 |
20 | System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute;
21 | System.Diagnostics.CodeAnalysis.NotNullWhenAttribute;
22 | System.Runtime.CompilerServices.SkipLocalsInitAttribute;
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/CommunityToolkit.Common/Converters.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace CommunityToolkit.Common;
6 |
7 | ///
8 | /// Set of helpers to convert between data types and notations.
9 | ///
10 | public static class Converters
11 | {
12 | ///
13 | /// Translate numeric file size in bytes to a human-readable shorter string format.
14 | ///
15 | /// File size in bytes.
16 | /// Returns file size short string.
17 | public static string ToFileSizeString(long size)
18 | {
19 | if (size < 1024)
20 | {
21 | return size.ToString("F0") + " bytes";
22 | }
23 | else if ((size >> 10) < 1024)
24 | {
25 | return (size / 1024F).ToString("F1") + " KB";
26 | }
27 | else if ((size >> 20) < 1024)
28 | {
29 | return ((size >> 10) / 1024F).ToString("F1") + " MB";
30 | }
31 | else if ((size >> 30) < 1024)
32 | {
33 | return ((size >> 20) / 1024F).ToString("F1") + " GB";
34 | }
35 | else if ((size >> 40) < 1024)
36 | {
37 | return ((size >> 30) / 1024F).ToString("F1") + " TB";
38 | }
39 | else if ((size >> 50) < 1024)
40 | {
41 | return ((size >> 40) / 1024F).ToString("F1") + " PB";
42 | }
43 | else
44 | {
45 | return ((size >> 50) / 1024F).ToString("F1") + " EB";
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/CommunityToolkit.Common/Deferred/DeferredCancelEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | namespace CommunityToolkit.Common.Deferred;
6 |
7 | ///
8 | /// which can also be canceled.
9 | ///
10 | public class DeferredCancelEventArgs : DeferredEventArgs
11 | {
12 | ///
13 | /// Gets or sets a value indicating whether the event should be canceled.
14 | ///
15 | public bool Cancel { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/src/CommunityToolkit.Common/Deferred/DeferredEventArgs.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.ComponentModel;
7 |
8 | #pragma warning disable CA1001
9 |
10 | namespace CommunityToolkit.Common.Deferred;
11 |
12 | ///
13 | /// which can retrieve a in order to process data asynchronously before an completes and returns to the calling control.
14 | ///
15 | public class DeferredEventArgs : EventArgs
16 | {
17 | ///
18 | /// Gets a new to use in cases where no wish to be provided.
19 | ///
20 | public static new DeferredEventArgs Empty => new();
21 |
22 | private readonly object eventDeferralLock = new();
23 |
24 | private EventDeferral? eventDeferral;
25 |
26 | ///
27 | /// Returns an which can be completed when deferred event is ready to continue.
28 | ///
29 | /// instance.
30 | public EventDeferral GetDeferral()
31 | {
32 | lock (this.eventDeferralLock)
33 | {
34 | return this.eventDeferral ??= new EventDeferral();
35 | }
36 | }
37 |
38 | ///
39 | /// DO NOT USE - This is a support method used by . It is public only for
40 | /// additional usage within extensions for the UWP based TypedEventHandler extensions.
41 | ///
42 | /// Internal EventDeferral reference
43 | [Browsable(false)]
44 | [EditorBrowsable(EditorBrowsableState.Never)]
45 | [Obsolete("This is an internal only method to be used by EventHandler extension classes, public callers should call GetDeferral() instead.")]
46 | public EventDeferral? GetCurrentDeferralAndReset()
47 | {
48 | lock (this.eventDeferralLock)
49 | {
50 | EventDeferral? eventDeferral = this.eventDeferral;
51 |
52 | this.eventDeferral = null;
53 |
54 | return eventDeferral;
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/src/CommunityToolkit.Common/Deferred/EventDeferral.cs:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 | // See the LICENSE file in the project root for more information.
4 |
5 | using System;
6 | using System.ComponentModel;
7 | #if NET8_0_OR_GREATER
8 | using System.Runtime.CompilerServices;
9 | #endif
10 | using System.Threading;
11 | using System.Threading.Tasks;
12 |
13 | #pragma warning disable CA1063
14 |
15 | namespace CommunityToolkit.Common.Deferred;
16 |
17 | ///
18 | /// Deferral handle provided by a .
19 | ///
20 | public class EventDeferral : IDisposable
21 | {
22 | #if NET8_0_OR_GREATER
23 | private readonly TaskCompletionSource taskCompletionSource = new();
24 | #else
25 | private readonly TaskCompletionSource