From 8be732815d76b588d0263d9c3c9b78943cbb25b7 Mon Sep 17 00:00:00 2001
From: XAML-Knight <86266896+XAML-Knight@users.noreply.github.com>
Date: Thu, 2 Dec 2021 13:15:33 -0800
Subject: [PATCH] .NET Standard extraction (#4395)
* Initial commit - remove projects
* After effects of removing NET Standard
* Removed duplicate tests, continued refactor
* Change to 7.1.2
* Update to 7.1.2 NuGet
* Address CI build errors
* Remove files from file system
* Update namespace in comments
* code comment to kick off CI build
* Initial commit - remove projects
* After effects of removing NET Standard
* Removed duplicate tests, continued refactor
* Change to 7.1.2
* Update to 7.1.2 NuGet
* Address CI build errors
* Remove files from file system
* Update namespace in comments
* code comment to kick off CI build
* Update cake
* Remove MVVM package reference
* Bring in Microsoft.Toolkit NuGet
* Delete solution filter file
---
.../Attributes/DoesNotReturnAttribute.cs | 19 -
.../Attributes/DoesNotReturnIfAttribute.cs | 36 -
.../Attributes/NotNullAttribute.cs | 20 -
.../Attributes/SkipLocalsInitAttribute.cs | 28 -
.../Extensions/TypeExtensions.cs | 225 --
.../Extensions/ValueTypeExtensions.cs | 74 -
.../Generated/Guard.Collection.g.cs | 1827 ---------
.../Generated/Guard.Collection.tt | 301 --
.../Generated/Guard.Comparable.Numeric.g.cs | 3532 -----------------
.../Generated/Guard.Comparable.Numeric.tt | 274 --
.../Generated/Guard.md | 17 -
.../Generated/ThrowHelper.Collection.g.cs | 817 ----
.../Generated/ThrowHelper.Collection.tt | 128 -
.../Generated/TypeInfo.ttinclude | 116 -
.../Guard.Comparable.Generic.cs | 445 ---
.../Guard.Comparable.Numeric.cs | 271 --
Microsoft.Toolkit.Diagnostics/Guard.IO.cs | 84 -
Microsoft.Toolkit.Diagnostics/Guard.String.cs | 410 --
Microsoft.Toolkit.Diagnostics/Guard.Tasks.cs | 188 -
Microsoft.Toolkit.Diagnostics/Guard.cs | 352 --
.../Guard.Collection.Generic.ThrowHelper.cs | 53 -
.../Guard.Comparable.Generic.ThrowHelper.cs | 174 -
.../Guard.Comparable.Numeric.ThrowHelper.cs | 111 -
.../Internals/Guard.IO.ThrowHelper.cs | 58 -
.../Internals/Guard.String.ThrowHelper.cs | 206 -
.../Internals/Guard.Tasks.ThrowHelper.cs | 112 -
.../Internals/Guard.ThrowHelper.cs | 204 -
.../Microsoft.Toolkit.Diagnostics.csproj | 100 -
.../ThrowHelper.Generic.cs | 1102 -----
Microsoft.Toolkit.Diagnostics/ThrowHelper.cs | 940 -----
.../Attributes/NotNullWhenAttribute.cs | 36 -
.../Attributes/SkipLocalsInitAttribute.cs | 28 -
Microsoft.Toolkit.HighPerformance/Box{T}.cs | 229 --
.../Buffers/ArrayPoolBufferWriter{T}.cs | 365 --
.../Buffers/Enums/AllocationMode.cs | 22 -
.../Buffers/Interfaces/IBuffer{T}.cs | 50 -
.../ArrayMemoryManager{TFrom,TTo}.cs | 133 -
.../Internals/Interfaces/IMemoryManager.cs | 25 -
.../ProxyMemoryManager{TFrom,TTo}.cs | 134 -
.../Internals/RawObjectMemoryManager{T}.cs | 98 -
.../Internals/StringMemoryManager{TTo}.cs | 125 -
.../Buffers/MemoryBufferWriter{T}.cs | 192 -
.../Buffers/MemoryOwner{T}.cs | 355 --
.../Buffers/SpanOwner{T}.cs | 211 -
.../Buffers/StringPool.cs | 799 ----
.../Buffers/Views/MemoryDebugView{T}.cs | 57 -
.../Enumerables/ReadOnlyRefEnumerable{T}.cs | 472 ---
.../Enumerables/ReadOnlySpanEnumerable{T}.cs | 157 -
.../Enumerables/ReadOnlySpanTokenizer{T}.cs | 115 -
.../Enumerables/RefEnumerable{T}.cs | 560 ---
.../Enumerables/SpanEnumerable{T}.cs | 162 -
.../Enumerables/SpanTokenizer{T}.cs | 106 -
.../Extensions/ArrayExtensions.1D.cs | 221 --
.../Extensions/ArrayExtensions.2D.cs | 467 ---
.../Extensions/ArrayExtensions.3D.cs | 324 --
.../ArrayPoolBufferWriterExtensions.cs | 31 -
.../Extensions/ArrayPoolExtensions.cs | 56 -
.../Extensions/BoolExtensions.cs | 83 -
.../Extensions/HashCodeExtensions.cs | 35 -
.../Extensions/IBufferWriterExtensions.cs | 136 -
.../Extensions/IMemoryOwnerExtensions.cs | 36 -
.../Extensions/ListExtensions.cs | 42 -
.../Extensions/MemoryExtensions.cs | 119 -
.../Extensions/NullableExtensions.cs | 55 -
.../Extensions/ReadOnlyMemoryExtensions.cs | 158 -
.../Extensions/ReadOnlySpanExtensions.cs | 403 --
.../Extensions/SpanExtensions.cs | 301 --
.../Extensions/SpinLockExtensions.cs | 188 -
.../Extensions/StreamExtensions.cs | 253 --
.../Extensions/StringExtensions.cs | 168 -
.../Helpers/BitHelper.cs | 467 ---
.../Helpers/HashCode{T}.cs | 85 -
.../Helpers/Internals/BitOperations.cs | 43 -
.../Helpers/Internals/RefEnumerableHelper.cs | 267 --
.../Helpers/Internals/RuntimeHelpers.cs | 304 --
.../Helpers/Internals/SpanHelper.Count.cs | 368 --
.../Helpers/Internals/SpanHelper.Hash.cs | 315 --
.../Helpers/ObjectMarshal.cs | 148 -
.../Helpers/ParallelHelper.For.IAction.cs | 249 --
.../Helpers/ParallelHelper.For.IAction2D.cs | 347 --
.../ParallelHelper.ForEach.IInAction.cs | 172 -
.../ParallelHelper.ForEach.IInAction2D.cs | 160 -
.../ParallelHelper.ForEach.IRefAction.cs | 172 -
.../ParallelHelper.ForEach.IRefAction2D.cs | 167 -
.../Helpers/ParallelHelper.ThrowExceptions.cs | 60 -
.../Memory/Internals/OverflowHelper.cs | 72 -
.../Memory/Internals/ThrowHelper.cs | 130 -
.../Memory/Memory2D{T}.cs | 905 -----
.../Memory/ReadOnlyMemory2D{T}.cs | 923 -----
.../Memory/ReadOnlySpan2D{T}.Enumerator.cs | 201 -
.../Memory/ReadOnlySpan2D{T}.cs | 1035 -----
.../Memory/Span2D{T}.Enumerator.cs | 201 -
.../Memory/Span2D{T}.cs | 1178 ------
.../Memory/Views/MemoryDebugView2D{T}.cs | 57 -
.../Microsoft.Toolkit.HighPerformance.csproj | 118 -
.../NullableReadOnlyRef{T}.cs | 139 -
.../NullableRef{T}.cs | 123 -
.../Properties/AssemblyInfo.cs | 11 -
.../ReadOnlyRef{T}.cs | 134 -
Microsoft.Toolkit.HighPerformance/Ref{T}.cs | 103 -
.../IBufferWriterStream{TWriter}.Memory.cs | 76 -
.../Streams/IBufferWriterStream{TWriter}.cs | 173 -
.../Streams/IMemoryOwnerStream{TSource}.cs | 42 -
.../Streams/MemoryStream.ThrowExceptions.cs | 97 -
.../Streams/MemoryStream.Validate.cs | 83 -
.../Streams/MemoryStream.cs | 95 -
.../Streams/MemoryStream{TSource}.Memory.cs | 113 -
.../Streams/MemoryStream{TSource}.cs | 305 --
.../Streams/Sources/ArrayBufferWriterOwner.cs | 52 -
.../Streams/Sources/ArrayOwner.cs | 78 -
.../Streams/Sources/IBufferWriterOwner.cs | 52 -
.../Streams/Sources/Interfaces/ISpanOwner.cs | 24 -
.../Streams/Sources/MemoryManagerOwner.cs | 65 -
.../AnalyzerReleases.Shipped.md | 2 -
.../AnalyzerReleases.Unshipped.md | 20 -
.../Attributes/NotNullWhenAttribute.cs | 25 -
.../NullabilityAttributesGenerator.cs | 60 -
.../INotifyPropertyChangedGenerator.cs | 77 -
.../ObservableObjectGenerator.cs | 63 -
...ervablePropertyGenerator.SyntaxReceiver.cs | 58 -
.../ObservablePropertyGenerator.cs | 590 ---
.../ObservableRecipientGenerator.cs | 131 -
...teAllPropertiesGenerator.SyntaxReceiver.cs | 44 -
...ValidatorValidateAllPropertiesGenerator.cs | 245 --
...ansitiveMembersGenerator.SyntaxReceiver.cs | 73 -
.../TransitiveMembersGenerator.cs | 286 --
.../Diagnostics/DiagnosticDescriptors.cs | 224 --
.../Diagnostics/DiagnosticExtensions.cs | 47 -
.../INotifyPropertyChanged.cs | 497 ---
.../Extensions/AttributeDataExtensions.cs | 118 -
.../Extensions/INamedTypeSymbolExtensions.cs | 76 -
.../MemberDeclarationSyntaxExtensions.cs | 57 -
.../Input/ICommandGenerator.SyntaxReceiver.cs | 51 -
.../Input/ICommandGenerator.cs | 346 --
...ngerRegisterAllGenerator.SyntaxReceiver.cs | 44 -
.../IMessengerRegisterAllGenerator.cs | 292 --
...osoft.Toolkit.Mvvm.SourceGenerators.csproj | 45 -
.../IsExternalInit.cs | 17 -
.../Attributes/NotNullAttribute.cs | 20 -
.../Attributes/NotNullIfNotNullAttribute.cs | 27 -
.../Attributes/NotNullWhenAttribute.cs | 29 -
.../AlsoNotifyChangeForAttribute.cs | 100 -
.../INotifyPropertyChangedAttribute.cs | 38 -
.../Attributes/ObservableObjectAttribute.cs | 32 -
.../Attributes/ObservablePropertyAttribute.cs | 57 -
.../ObservableRecipientAttribute.cs | 46 -
.../ComponentModel/ObservableObject.cs | 590 ---
.../ComponentModel/ObservableRecipient.cs | 305 --
.../ComponentModel/ObservableValidator.cs | 772 ----
.../__ObservableValidatorHelper.cs | 33 -
.../DependencyInjection/Ioc.cs | 167 -
.../Input/AsyncRelayCommand.cs | 186 -
.../Input/AsyncRelayCommand{T}.cs | 196 -
.../Input/Attributes/ICommandAttribute.cs | 66 -
.../Input/Interfaces/IAsyncRelayCommand.cs | 53 -
.../Input/Interfaces/IAsyncRelayCommand{T}.cs | 23 -
.../Input/Interfaces/IRelayCommand.cs | 20 -
.../Input/Interfaces/IRelayCommand{T}.cs | 30 -
Microsoft.Toolkit.Mvvm/Input/RelayCommand.cs | 78 -
.../Input/RelayCommand{T}.cs | 104 -
.../Messaging/IMessenger.cs | 163 -
.../Messaging/IMessengerExtensions.cs | 364 --
.../Messaging/IRecipient{TMessage}.cs | 20 -
.../Internals/ArrayPoolBufferWriter{T}.cs | 107 -
.../ConditionalWeakTable2{TKey,TValue}.cs | 165 -
.../DictionarySlim{TKey,TValue}.cs | 407 --
.../HashHelpers.cs | 17 -
.../IDictionarySlim.cs | 22 -
.../IDictionarySlim{TKey,TValue}.cs | 27 -
.../IDictionarySlim{TKey}.cs | 23 -
.../Internals/System/Gen2GcCallback.cs | 84 -
.../Messaging/Internals/Type2.cs | 83 -
.../Messaging/Internals/Unit.cs | 35 -
.../AsyncCollectionRequestMessage{T}.cs | 143 -
.../Messages/AsyncRequestMessage{T}.cs | 95 -
.../Messages/CollectionRequestMessage{T}.cs | 50 -
.../Messages/PropertyChangedMessage{T}.cs | 53 -
.../Messaging/Messages/RequestMessage{T}.cs | 84 -
.../Messages/ValueChangedMessage{T}.cs | 27 -
.../Messaging/StrongReferenceMessenger.cs | 578 ---
.../Messaging/WeakReferenceMessenger.cs | 363 --
.../Microsoft.Toolkit.Mvvm.csproj | 56 -
.../Controls/SampleAppMarkdownRenderer.cs | 1 -
.../Microsoft.Toolkit.Uwp.SampleApp.csproj | 7 +-
.../Models/Sample.cs | 1 -
.../Models/Samples.cs | 1 -
.../PeopleSource.cs | 7 +-
.../Object Storage/ObjectStoragePage.xaml.cs | 1 -
.../Microsoft.Toolkit.Uwp.UI.csproj | 4 +
...pplicationDataStorageHelper.CacheFolder.cs | 1 -
.../ApplicationDataStorageHelper.cs | 2 +-
.../Helpers/SystemInformation.cs | 1 -
.../IncrementalLoadingCollection.cs | 2 +-
.../Microsoft.Toolkit.Uwp.csproj | 2 +-
.../Attributes/NotNullIfNotNullAttribute.cs | 29 -
.../Attributes/NotNullWhenAttribute.cs | 29 -
.../Collections/IReadOnlyObservableGroup.cs | 27 -
.../Collections/ObservableGroup.cs | 80 -
.../ObservableGroupedCollection.cs | 50 -
.../ObservableGroupedCollectionExtensions.cs | 451 ---
.../Collections/ReadOnlyObservableGroup.cs | 57 -
.../ReadOnlyObservableGroupedCollection.cs | 104 -
Microsoft.Toolkit/Converters.cs | 49 -
.../Deferred/DeferredCancelEventArgs.cs | 17 -
.../Deferred/DeferredEventArgs.cs | 60 -
Microsoft.Toolkit/Deferred/EventDeferral.cs | 55 -
.../Extensions/ArrayExtensions.cs | 168 -
.../Extensions/EventHandlerExtensions.cs | 67 -
.../ISettingsStorageHelperExtensions.cs | 84 -
.../Extensions/StringExtensions.cs | 188 -
.../Extensions/TaskExtensions.cs | 85 -
.../ObjectStorage/DirectoryItemType.cs | 27 -
.../ObjectStorage/IFileStorageHelper.cs | 68 -
.../ObjectStorage/IObjectSerializer.cs | 28 -
.../ObjectStorage/ISettingsStorageHelper.cs | 45 -
.../Helpers/ObjectStorage/SystemSerializer.cs | 46 -
.../IIncrementalSource.cs | 34 -
Microsoft.Toolkit/Microsoft.Toolkit.csproj | 30 -
.../MainPage.xaml | 18 -
.../MainPage.xaml.cs | 23 -
.../MainPage.xaml | 17 -
.../MainPage.xaml.cs | 23 -
.../Microsoft.Toolkit.Mvvm/MainPage.xaml | 17 -
.../Microsoft.Toolkit.Mvvm/MainPage.xaml.cs | 25 -
SmokeTests/Microsoft.Toolkit/MainPage.xaml | 18 -
SmokeTests/Microsoft.Toolkit/MainPage.xaml.cs | 21 -
SmokeTests/SmokeTests.proj | 4 -
UITests/UITests.App/UITests.App.csproj | 21 +-
.../UITests.Tests.MSTest.csproj | 1 +
UnitTests/Extensions/Test_TaskExtensions.cs | 51 -
.../UnitTests.HighPerformance.NetCore.csproj | 25 -
.../Buffers/Internals/UnmanagedSpanOwner.cs | 82 -
.../Buffers/Test_ArrayPoolBufferWriter{T}.cs | 231 --
.../Buffers/Test_MemoryBufferWriter{T}.cs | 80 -
.../Buffers/Test_MemoryOwner{T}.cs | 166 -
.../Buffers/Test_SpanOwner{T}.cs | 101 -
.../Buffers/Test_StringPool.cs | 344 --
.../Buffers/TrackingArrayPool{T}.cs | 39 -
.../Test_ReadOnlyRefEnumerable{T}.cs | 131 -
.../Enumerables/Test_RefEnumerable{T}.cs | 131 -
.../Extensions/Test_ArrayExtensions.1D.cs | 58 -
.../Extensions/Test_ArrayExtensions.2D.cs | 477 ---
.../Extensions/Test_ArrayExtensions.3D.cs | 62 -
.../Extensions/Test_ArrayPoolExtensions.cs | 97 -
.../Extensions/Test_BoolExtensions.cs | 50 -
.../Extensions/Test_HashCodeExtensions.cs | 116 -
.../Test_IBufferWriterExtensions.cs | 129 -
.../Extensions/Test_IMemoryOwnerExtensions.cs | 67 -
.../Extensions/Test_MemoryExtensions.cs | 635 ---
.../Extensions/Test_NullableExtensions.cs | 42 -
.../Test_ReadOnlyMemoryExtensions.cs | 41 -
.../Test_ReadOnlySpanExtensions.Count.cs | 264 --
.../Extensions/Test_ReadOnlySpanExtensions.cs | 315 --
.../Extensions/Test_SpanExtensions.cs | 214 -
.../Extensions/Test_SpinLockExtensions.cs | 74 -
.../Extensions/Test_StreamExtensions.cs | 42 -
.../Extensions/Test_StringExtensions.cs | 51 -
.../Helpers/Test_BitHelper.cs | 325 --
.../Helpers/Test_HashCode{T}.cs | 134 -
.../Helpers/Test_ObjectMarshal.cs | 123 -
.../Helpers/Test_ParallelHelper.For.cs | 114 -
.../Helpers/Test_ParallelHelper.For2D.cs | 131 -
.../Helpers/Test_ParallelHelper.ForEach.In.cs | 73 -
.../Test_ParallelHelper.ForEach.In2D.cs | 80 -
.../Test_ParallelHelper.ForEach.Ref.cs | 58 -
.../Test_ParallelHelper.ForEach.Ref2D.cs | 53 -
.../Test_ParallelHelper.ThrowExceptions.cs | 160 -
.../Memory/Test_Memory2D{T}.cs | 543 ---
.../Memory/Test_ReadOnlyMemory2D{T}.cs | 491 ---
.../Memory/Test_ReadOnlySpan2D{T}.cs | 1050 -----
.../Memory/Test_Span2D{T}.cs | 1176 ------
.../Streams/Test_IBufferWriterStream.cs | 161 -
.../Streams/Test_IMemoryOwnerStream.cs | 35 -
.../Test_MemoryStream.ThrowExceptions.cs | 182 -
.../Streams/Test_MemoryStream.cs | 289 --
.../Test_Box{T}.cs | 104 -
.../Test_NullableReadOnlyRef{T}.cs | 109 -
.../Test_NullableRef{T}.cs | 89 -
.../Test_ReadOnlyRef{T}.cs | 45 -
.../Test_Ref{T}.cs | 53 -
...UnitTests.HighPerformance.Shared.projitems | 61 -
.../UnitTests.HighPerformance.Shared.shproj | 12 -
.../Assets/LockScreenLogo.scale-200.png | Bin 1430 -> 0 bytes
.../Assets/SplashScreen.scale-200.png | Bin 7700 -> 0 bytes
.../Assets/Square150x150Logo.scale-200.png | Bin 2937 -> 0 bytes
.../Assets/Square44x44Logo.scale-200.png | Bin 1647 -> 0 bytes
...x44Logo.targetsize-24_altform-unplated.png | Bin 1255 -> 0 bytes
.../Assets/StoreLogo.png | Bin 1451 -> 0 bytes
.../Assets/Wide310x150Logo.scale-200.png | Bin 3204 -> 0 bytes
.../Package.appxmanifest | 45 -
.../Properties/AssemblyInfo.cs | 21 -
.../Properties/Default.rd.xml | 26 -
.../UnitTestApp.xaml | 6 -
.../UnitTestApp.xaml.cs | 53 -
.../UnitTests.HighPerformance.UWP.csproj | 173 -
.../Mvvm/Test_ICommandAttribute.cs | 118 -
.../Test_INotifyPropertyChangedAttribute.cs | 131 -
.../Mvvm/Test_IRecipientGenerator.cs | 76 -
.../Mvvm/Test_ObservableObjectAttribute.cs | 118 -
.../Mvvm/Test_ObservablePropertyAttribute.cs | 394 --
.../Mvvm/Test_ObservableRecipientAttribute.cs | 106 -
.../UnitTests.NetCore.csproj | 31 -
...pleModelWithINPCAndObservableProperties.cs | 22 -
.../UnitTests.NetStandard.csproj | 13 -
UnitTests/UnitTests.Shared/.editorconfig | 17 -
.../UnitTests.Shared/Collections/IntGroup.cs | 20 -
.../Collections/ObservableGroupTests.cs | 125 -
...ervableGroupedCollectionExtensionsTests.cs | 539 ---
.../ObservableGroupedCollectionTests.cs | 43 -
.../ReadOnlyObservableGroupTests.cs | 133 -
...eadOnlyObservableGroupedCollectionTests.cs | 472 ---
.../Diagnostics/Test_Guard.Array.cs | 182 -
.../Test_Guard.Comparable.Numeric.cs | 113 -
.../Diagnostics/Test_Guard.cs | 703 ----
.../Diagnostics/Test_ThrowHelper.cs | 145 -
.../Extensions/Test_ArrayExtensions.cs | 90 -
.../Extensions/Test_EventHandlerExtensions.cs | 138 -
.../Extensions/Test_TaskExtensions.cs | 127 -
.../Extensions/Test_TypeExtensions.cs | 161 -
.../Extensions/Test_ValueTypeExtensions.cs | 26 -
.../Mvvm/Test_AsyncRelayCommand.cs | 183 -
.../Mvvm/Test_AsyncRelayCommand{T}.cs | 142 -
.../Mvvm/Test_Messenger.Request.cs | 373 --
.../UnitTests.Shared/Mvvm/Test_Messenger.cs | 631 ---
.../Mvvm/Test_ObservableObject.cs | 233 --
.../Mvvm/Test_ObservableRecipient.cs | 135 -
.../Mvvm/Test_ObservableValidator.cs | 729 ----
.../Mvvm/Test_RelayCommand.cs | 83 -
.../Mvvm/Test_RelayCommand{T}.cs | 86 -
.../UnitTests.Shared.projitems | 36 -
.../UnitTests.Shared/UnitTests.Shared.shproj | 12 -
.../Test_SourceGeneratorsDiagnostics.cs | 426 --
.../UnitTests.SourceGenerators.csproj | 21 -
.../Helpers/JsonObjectSerializer2.cs | 2 +-
.../Helpers/SystemTextJsonSerializer2.cs | 4 +-
.../Test_ApplicationDataStorageHelper.cs | 3 +-
.../Helpers/Test_SystemInformation.cs | 1 -
.../UnitTests.UWP/UI/Collection/DataSource.cs | 2 +-
UnitTests/UnitTests.UWP/UnitTests.UWP.csproj | 19 +-
.../UnitTests.XamlIslands.UWPApp.csproj | 6 +-
Windows Community Toolkit (NET).slnf | 18 -
Windows Community Toolkit.sln | 252 +-
build/build.cake | 12 -
343 files changed, 39 insertions(+), 58665 deletions(-)
delete mode 100644 Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnAttribute.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnIfAttribute.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Attributes/NotNullAttribute.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Attributes/SkipLocalsInitAttribute.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Extensions/TypeExtensions.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Extensions/ValueTypeExtensions.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.g.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.tt
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.g.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.tt
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/Guard.md
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/ThrowHelper.Collection.g.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/ThrowHelper.Collection.tt
delete mode 100644 Microsoft.Toolkit.Diagnostics/Generated/TypeInfo.ttinclude
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.Comparable.Generic.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.Comparable.Numeric.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.IO.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.String.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.Tasks.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Guard.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.Collection.Generic.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.Comparable.Generic.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.Comparable.Numeric.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.IO.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.String.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.Tasks.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Internals/Guard.ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/Microsoft.Toolkit.Diagnostics.csproj
delete mode 100644 Microsoft.Toolkit.Diagnostics/ThrowHelper.Generic.cs
delete mode 100644 Microsoft.Toolkit.Diagnostics/ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Attributes/NotNullWhenAttribute.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Attributes/SkipLocalsInitAttribute.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Box{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/ArrayPoolBufferWriter{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Enums/AllocationMode.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Interfaces/IBuffer{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Internals/ArrayMemoryManager{TFrom,TTo}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Internals/Interfaces/IMemoryManager.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Internals/ProxyMemoryManager{TFrom,TTo}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Internals/RawObjectMemoryManager{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Internals/StringMemoryManager{TTo}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/MemoryBufferWriter{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/MemoryOwner{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/SpanOwner{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/StringPool.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Buffers/Views/MemoryDebugView{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/ReadOnlyRefEnumerable{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/ReadOnlySpanEnumerable{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/ReadOnlySpanTokenizer{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/RefEnumerable{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/SpanEnumerable{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Enumerables/SpanTokenizer{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.1D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.2D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ArrayExtensions.3D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ArrayPoolBufferWriterExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ArrayPoolExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/BoolExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/HashCodeExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/IBufferWriterExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/IMemoryOwnerExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ListExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/MemoryExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/NullableExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ReadOnlyMemoryExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/ReadOnlySpanExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/SpanExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/SpinLockExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/StreamExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Extensions/StringExtensions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/BitHelper.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/HashCode{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/Internals/BitOperations.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/Internals/RefEnumerableHelper.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/Internals/RuntimeHelpers.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/Internals/SpanHelper.Count.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/Internals/SpanHelper.Hash.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ObjectMarshal.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.For.IAction.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.For.IAction2D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.ForEach.IInAction.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.ForEach.IInAction2D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.ForEach.IRefAction.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.ForEach.IRefAction2D.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Helpers/ParallelHelper.ThrowExceptions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Internals/OverflowHelper.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Internals/ThrowHelper.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Memory2D{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/ReadOnlyMemory2D{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/ReadOnlySpan2D{T}.Enumerator.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/ReadOnlySpan2D{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Span2D{T}.Enumerator.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Span2D{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Memory/Views/MemoryDebugView2D{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Microsoft.Toolkit.HighPerformance.csproj
delete mode 100644 Microsoft.Toolkit.HighPerformance/NullableReadOnlyRef{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/NullableRef{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Properties/AssemblyInfo.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/ReadOnlyRef{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Ref{T}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/IBufferWriterStream{TWriter}.Memory.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/IBufferWriterStream{TWriter}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/IMemoryOwnerStream{TSource}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/MemoryStream.ThrowExceptions.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/MemoryStream.Validate.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/MemoryStream.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/MemoryStream{TSource}.Memory.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/MemoryStream{TSource}.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/Sources/ArrayBufferWriterOwner.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/Sources/ArrayOwner.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/Sources/IBufferWriterOwner.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/Sources/Interfaces/ISpanOwner.cs
delete mode 100644 Microsoft.Toolkit.HighPerformance/Streams/Sources/MemoryManagerOwner.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/AnalyzerReleases.Shipped.md
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/AnalyzerReleases.Unshipped.md
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Attributes/NotNullWhenAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Attributes/NullabilityAttributesGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/INotifyPropertyChangedGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservableObjectGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.SyntaxReceiver.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservableRecipientGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.SyntaxReceiver.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/ObservableValidatorValidateAllPropertiesGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/TransitiveMembersGenerator.SyntaxReceiver.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/ComponentModel/TransitiveMembersGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Diagnostics/DiagnosticDescriptors.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Diagnostics/DiagnosticExtensions.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/EmbeddedResources/INotifyPropertyChanged.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Extensions/AttributeDataExtensions.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Extensions/INamedTypeSymbolExtensions.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Extensions/MemberDeclarationSyntaxExtensions.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Input/ICommandGenerator.SyntaxReceiver.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Input/ICommandGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Messaging/IMessengerRegisterAllGenerator.SyntaxReceiver.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Messaging/IMessengerRegisterAllGenerator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/Microsoft.Toolkit.Mvvm.SourceGenerators.csproj
delete mode 100644 Microsoft.Toolkit.Mvvm.SourceGenerators/System.Runtime.CompilerServices/IsExternalInit.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Attributes/NotNullAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Attributes/NotNullIfNotNullAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Attributes/NotNullWhenAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/Attributes/AlsoNotifyChangeForAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/Attributes/INotifyPropertyChangedAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/Attributes/ObservableObjectAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/Attributes/ObservablePropertyAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/Attributes/ObservableRecipientAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/ObservableObject.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/ObservableRecipient.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/ObservableValidator.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/ComponentModel/__Internals/__ObservableValidatorHelper.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/DependencyInjection/Ioc.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/AsyncRelayCommand.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/AsyncRelayCommand{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/Attributes/ICommandAttribute.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/Interfaces/IAsyncRelayCommand.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/Interfaces/IAsyncRelayCommand{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/Interfaces/IRelayCommand.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/Interfaces/IRelayCommand{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/RelayCommand.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Input/RelayCommand{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/IMessenger.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/IMessengerExtensions.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/IRecipient{TMessage}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/ArrayPoolBufferWriter{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/ConditionalWeakTable2{TKey,TValue}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/DictionarySlim{TKey,TValue}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/HashHelpers.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/IDictionarySlim.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/IDictionarySlim{TKey,TValue}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Microsoft.Collections.Extensions/IDictionarySlim{TKey}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/System/Gen2GcCallback.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Type2.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Internals/Unit.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/AsyncCollectionRequestMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/AsyncRequestMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/CollectionRequestMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/PropertyChangedMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/RequestMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/Messages/ValueChangedMessage{T}.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/StrongReferenceMessenger.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Messaging/WeakReferenceMessenger.cs
delete mode 100644 Microsoft.Toolkit.Mvvm/Microsoft.Toolkit.Mvvm.csproj
delete mode 100644 Microsoft.Toolkit/Attributes/NotNullIfNotNullAttribute.cs
delete mode 100644 Microsoft.Toolkit/Attributes/NotNullWhenAttribute.cs
delete mode 100644 Microsoft.Toolkit/Collections/IReadOnlyObservableGroup.cs
delete mode 100644 Microsoft.Toolkit/Collections/ObservableGroup.cs
delete mode 100644 Microsoft.Toolkit/Collections/ObservableGroupedCollection.cs
delete mode 100644 Microsoft.Toolkit/Collections/ObservableGroupedCollectionExtensions.cs
delete mode 100644 Microsoft.Toolkit/Collections/ReadOnlyObservableGroup.cs
delete mode 100644 Microsoft.Toolkit/Collections/ReadOnlyObservableGroupedCollection.cs
delete mode 100644 Microsoft.Toolkit/Converters.cs
delete mode 100644 Microsoft.Toolkit/Deferred/DeferredCancelEventArgs.cs
delete mode 100644 Microsoft.Toolkit/Deferred/DeferredEventArgs.cs
delete mode 100644 Microsoft.Toolkit/Deferred/EventDeferral.cs
delete mode 100644 Microsoft.Toolkit/Extensions/ArrayExtensions.cs
delete mode 100644 Microsoft.Toolkit/Extensions/EventHandlerExtensions.cs
delete mode 100644 Microsoft.Toolkit/Extensions/ISettingsStorageHelperExtensions.cs
delete mode 100644 Microsoft.Toolkit/Extensions/StringExtensions.cs
delete mode 100644 Microsoft.Toolkit/Extensions/TaskExtensions.cs
delete mode 100644 Microsoft.Toolkit/Helpers/ObjectStorage/DirectoryItemType.cs
delete mode 100644 Microsoft.Toolkit/Helpers/ObjectStorage/IFileStorageHelper.cs
delete mode 100644 Microsoft.Toolkit/Helpers/ObjectStorage/IObjectSerializer.cs
delete mode 100644 Microsoft.Toolkit/Helpers/ObjectStorage/ISettingsStorageHelper.cs
delete mode 100644 Microsoft.Toolkit/Helpers/ObjectStorage/SystemSerializer.cs
delete mode 100644 Microsoft.Toolkit/IncrementalLoadingCollection/IIncrementalSource.cs
delete mode 100644 Microsoft.Toolkit/Microsoft.Toolkit.csproj
delete mode 100644 SmokeTests/Microsoft.Toolkit.Diagnostics/MainPage.xaml
delete mode 100644 SmokeTests/Microsoft.Toolkit.Diagnostics/MainPage.xaml.cs
delete mode 100644 SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml
delete mode 100644 SmokeTests/Microsoft.Toolkit.HighPerformance/MainPage.xaml.cs
delete mode 100644 SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml
delete mode 100644 SmokeTests/Microsoft.Toolkit.Mvvm/MainPage.xaml.cs
delete mode 100644 SmokeTests/Microsoft.Toolkit/MainPage.xaml
delete mode 100644 SmokeTests/Microsoft.Toolkit/MainPage.xaml.cs
delete mode 100644 UnitTests/Extensions/Test_TaskExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.NetCore/UnitTests.HighPerformance.NetCore.csproj
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Internals/UnmanagedSpanOwner.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Test_ArrayPoolBufferWriter{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Test_MemoryBufferWriter{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Test_MemoryOwner{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Test_SpanOwner{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/Test_StringPool.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Buffers/TrackingArrayPool{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Enumerables/Test_ReadOnlyRefEnumerable{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Enumerables/Test_RefEnumerable{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ArrayExtensions.1D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ArrayExtensions.2D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ArrayExtensions.3D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ArrayPoolExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_BoolExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_HashCodeExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_IBufferWriterExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_IMemoryOwnerExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_MemoryExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_NullableExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlyMemoryExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.Count.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_ReadOnlySpanExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_SpanExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_SpinLockExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_StreamExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Extensions/Test_StringExtensions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_BitHelper.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_HashCode{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ObjectMarshal.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.For.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.For2D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.ForEach.In.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.ForEach.In2D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.ForEach.Ref.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.ForEach.Ref2D.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Helpers/Test_ParallelHelper.ThrowExceptions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Memory/Test_Memory2D{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Memory/Test_ReadOnlyMemory2D{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Memory/Test_ReadOnlySpan2D{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Memory/Test_Span2D{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Streams/Test_IBufferWriterStream.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Streams/Test_IMemoryOwnerStream.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Streams/Test_MemoryStream.ThrowExceptions.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Streams/Test_MemoryStream.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Test_Box{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Test_NullableReadOnlyRef{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Test_NullableRef{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Test_ReadOnlyRef{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/Test_Ref{T}.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/UnitTests.HighPerformance.Shared.projitems
delete mode 100644 UnitTests/UnitTests.HighPerformance.Shared/UnitTests.HighPerformance.Shared.shproj
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/LockScreenLogo.scale-200.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/SplashScreen.scale-200.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/Square150x150Logo.scale-200.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/Square44x44Logo.scale-200.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/StoreLogo.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Assets/Wide310x150Logo.scale-200.png
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Package.appxmanifest
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Properties/AssemblyInfo.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/Properties/Default.rd.xml
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/UnitTestApp.xaml
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/UnitTestApp.xaml.cs
delete mode 100644 UnitTests/UnitTests.HighPerformance.UWP/UnitTests.HighPerformance.UWP.csproj
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_ICommandAttribute.cs
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_INotifyPropertyChangedAttribute.cs
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_IRecipientGenerator.cs
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_ObservableObjectAttribute.cs
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_ObservablePropertyAttribute.cs
delete mode 100644 UnitTests/UnitTests.NetCore/Mvvm/Test_ObservableRecipientAttribute.cs
delete mode 100644 UnitTests/UnitTests.NetCore/UnitTests.NetCore.csproj
delete mode 100644 UnitTests/UnitTests.NetStandard/SampleModelWithINPCAndObservableProperties.cs
delete mode 100644 UnitTests/UnitTests.NetStandard/UnitTests.NetStandard.csproj
delete mode 100644 UnitTests/UnitTests.Shared/.editorconfig
delete mode 100644 UnitTests/UnitTests.Shared/Collections/IntGroup.cs
delete mode 100644 UnitTests/UnitTests.Shared/Collections/ObservableGroupTests.cs
delete mode 100644 UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionExtensionsTests.cs
delete mode 100644 UnitTests/UnitTests.Shared/Collections/ObservableGroupedCollectionTests.cs
delete mode 100644 UnitTests/UnitTests.Shared/Collections/ReadOnlyObservableGroupTests.cs
delete mode 100644 UnitTests/UnitTests.Shared/Collections/ReadOnlyObservableGroupedCollectionTests.cs
delete mode 100644 UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Array.cs
delete mode 100644 UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.Comparable.Numeric.cs
delete mode 100644 UnitTests/UnitTests.Shared/Diagnostics/Test_Guard.cs
delete mode 100644 UnitTests/UnitTests.Shared/Diagnostics/Test_ThrowHelper.cs
delete mode 100644 UnitTests/UnitTests.Shared/Extensions/Test_ArrayExtensions.cs
delete mode 100644 UnitTests/UnitTests.Shared/Extensions/Test_EventHandlerExtensions.cs
delete mode 100644 UnitTests/UnitTests.Shared/Extensions/Test_TaskExtensions.cs
delete mode 100644 UnitTests/UnitTests.Shared/Extensions/Test_TypeExtensions.cs
delete mode 100644 UnitTests/UnitTests.Shared/Extensions/Test_ValueTypeExtensions.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_AsyncRelayCommand.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_AsyncRelayCommand{T}.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_Messenger.Request.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_Messenger.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_ObservableObject.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_ObservableRecipient.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_ObservableValidator.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_RelayCommand.cs
delete mode 100644 UnitTests/UnitTests.Shared/Mvvm/Test_RelayCommand{T}.cs
delete mode 100644 UnitTests/UnitTests.Shared/UnitTests.Shared.projitems
delete mode 100644 UnitTests/UnitTests.Shared/UnitTests.Shared.shproj
delete mode 100644 UnitTests/UnitTests.SourceGenerators/Test_SourceGeneratorsDiagnostics.cs
delete mode 100644 UnitTests/UnitTests.SourceGenerators/UnitTests.SourceGenerators.csproj
delete mode 100644 Windows Community Toolkit (NET).slnf
diff --git a/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnAttribute.cs b/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnAttribute.cs
deleted file mode 100644
index 5f11632ac18..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#if !NETSTANDARD2_1_OR_GREATER
-
-namespace System.Diagnostics.CodeAnalysis
-{
- ///
- /// Applied to a method that will never return under any circumstance.
- ///
- /// Internal copy from the BCL attribute.
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- internal sealed class DoesNotReturnAttribute : Attribute
- {
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnIfAttribute.cs b/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnIfAttribute.cs
deleted file mode 100644
index 06799235131..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Attributes/DoesNotReturnIfAttribute.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#if !NETSTANDARD2_1_OR_GREATER
-
-namespace System.Diagnostics.CodeAnalysis
-{
- ///
- /// Specifies that a given also indicates
- /// whether the method will not return (eg. throw an exception).
- ///
- /// Internal copy from the BCL attribute.
- [AttributeUsage(AttributeTargets.Parameter)]
- internal sealed class DoesNotReturnIfAttribute : Attribute
- {
- ///
- /// Initializes a new instance of the class.
- ///
- ///
- /// The condition parameter value. Code after the method will be considered unreachable
- /// by diagnostics if the argument to the associated parameter matches this value.
- ///
- public DoesNotReturnIfAttribute(bool parameterValue)
- {
- ParameterValue = parameterValue;
- }
-
- ///
- /// Gets a value indicating whether the parameter value should be .
- ///
- public bool ParameterValue { get; }
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Attributes/NotNullAttribute.cs b/Microsoft.Toolkit.Diagnostics/Attributes/NotNullAttribute.cs
deleted file mode 100644
index 4595d9d9cd7..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Attributes/NotNullAttribute.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#if !NETSTANDARD2_1_OR_GREATER
-
-namespace System.Diagnostics.CodeAnalysis
-{
- ///
- /// Specifies that an output will not be even if the corresponding type allows it.
- /// Specifies that an input argument was not when the call returns.
- ///
- /// Internal copy from the BCL attribute.
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue)]
- internal sealed class NotNullAttribute : Attribute
- {
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Attributes/SkipLocalsInitAttribute.cs b/Microsoft.Toolkit.Diagnostics/Attributes/SkipLocalsInitAttribute.cs
deleted file mode 100644
index 39d119f6ad2..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Attributes/SkipLocalsInitAttribute.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-#if !NET5_0
-
-namespace System.Runtime.CompilerServices
-{
- ///
- /// Used to indicate to the compiler that the .locals init flag should not be set in method headers.
- ///
- /// Internal copy from the BCL attribute.
- [AttributeUsage(
- AttributeTargets.Module |
- AttributeTargets.Class |
- AttributeTargets.Struct |
- AttributeTargets.Interface |
- AttributeTargets.Constructor |
- AttributeTargets.Method |
- AttributeTargets.Property |
- AttributeTargets.Event,
- Inherited = false)]
- internal sealed class SkipLocalsInitAttribute : Attribute
- {
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Extensions/TypeExtensions.cs b/Microsoft.Toolkit.Diagnostics/Extensions/TypeExtensions.cs
deleted file mode 100644
index 0791e2c0433..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Extensions/TypeExtensions.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics.Contracts;
-using System.Linq;
-#if NETSTANDARD1_4
-using System.Reflection;
-#endif
-using System.Runtime.CompilerServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helpers for working with types.
- ///
- public static class TypeExtensions
- {
- ///
- /// The mapping of built-in types to their simple representation.
- ///
- private static readonly IReadOnlyDictionary BuiltInTypesMap = new Dictionary
- {
- [typeof(bool)] = "bool",
- [typeof(byte)] = "byte",
- [typeof(sbyte)] = "sbyte",
- [typeof(short)] = "short",
- [typeof(ushort)] = "ushort",
- [typeof(char)] = "char",
- [typeof(int)] = "int",
- [typeof(uint)] = "uint",
- [typeof(float)] = "float",
- [typeof(long)] = "long",
- [typeof(ulong)] = "ulong",
- [typeof(double)] = "double",
- [typeof(decimal)] = "decimal",
- [typeof(object)] = "object",
- [typeof(string)] = "string",
- [typeof(void)] = "void"
- };
-
- ///
- /// A thread-safe mapping of precomputed string representation of types.
- ///
- private static readonly ConditionalWeakTable DisplayNames = new ConditionalWeakTable();
-
- ///
- /// Returns a simple string representation of a type.
- ///
- /// The input type.
- /// The string representation of .
- [Pure]
- public static string ToTypeString(this Type type)
- {
- // Local function to create the formatted string for a given type
- static string FormatDisplayString(Type type, int genericTypeOffset, ReadOnlySpan typeArguments)
- {
- // Primitive types use the keyword name
- if (BuiltInTypesMap.TryGetValue(type, out string? typeName))
- {
- return typeName!;
- }
-
- // Array types are displayed as Foo[]
- if (type.IsArray)
- {
- var elementType = type.GetElementType()!;
- var rank = type.GetArrayRank();
-
- return $"{FormatDisplayString(elementType, 0, elementType.GetGenericArguments())}[{new string(',', rank - 1)}]";
- }
-
- // By checking generic types here we are only interested in specific cases,
- // ie. nullable value types or value typles. We have a separate path for custom
- // generic types, as we can't rely on this API in that case, as it doesn't show
- // a difference between nested types that are themselves generic, or nested simple
- // types from a generic declaring type. To deal with that, we need to manually track
- // the offset within the array of generic arguments for the whole constructed type.
- if (type.IsGenericType())
- {
- var genericTypeDefinition = type.GetGenericTypeDefinition();
-
- // Nullable types are displayed as T?
- if (genericTypeDefinition == typeof(Nullable<>))
- {
- var nullableArguments = type.GetGenericArguments();
-
- return $"{FormatDisplayString(nullableArguments[0], 0, nullableArguments)}?";
- }
-
- // ValueTuple types are displayed as (T1, T2)
- if (genericTypeDefinition == typeof(ValueTuple<>) ||
- genericTypeDefinition == typeof(ValueTuple<,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,,,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,,,,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,,,,,>) ||
- genericTypeDefinition == typeof(ValueTuple<,,,,,,,>))
- {
- var formattedTypes = type.GetGenericArguments().Select(t => FormatDisplayString(t, 0, t.GetGenericArguments()));
-
- return $"({string.Join(", ", formattedTypes)})";
- }
- }
-
- string displayName;
-
- // Generic types
- if (type.Name.Contains('`'))
- {
- // Retrieve the current generic arguments for the current type (leaf or not)
- var tokens = type.Name.Split('`');
- var genericArgumentsCount = int.Parse(tokens[1]);
- var typeArgumentsOffset = typeArguments.Length - genericTypeOffset - genericArgumentsCount;
- var currentTypeArguments = typeArguments.Slice(typeArgumentsOffset, genericArgumentsCount).ToArray();
- var formattedTypes = currentTypeArguments.Select(t => FormatDisplayString(t, 0, t.GetGenericArguments()));
-
- // Standard generic types are displayed as Foo
- displayName = $"{tokens[0]}<{string.Join(", ", formattedTypes)}>";
-
- // Track the current offset for the shared generic arguments list
- genericTypeOffset += genericArgumentsCount;
- }
- else
- {
- // Simple custom types
- displayName = type.Name;
- }
-
- // If the type is nested, recursively format the hierarchy as well
- if (type.IsNested)
- {
- var openDeclaringType = type.DeclaringType!;
- var rootGenericArguments = typeArguments.Slice(0, typeArguments.Length - genericTypeOffset).ToArray();
-
- // If the declaring type is generic, we need to reconstruct the closed type
- // manually, as the declaring type instance doesn't retain type information.
- if (rootGenericArguments.Length > 0)
- {
- var closedDeclaringType = openDeclaringType.GetGenericTypeDefinition().MakeGenericType(rootGenericArguments);
-
- return $"{FormatDisplayString(closedDeclaringType, genericTypeOffset, typeArguments)}.{displayName}";
- }
-
- return $"{FormatDisplayString(openDeclaringType, genericTypeOffset, typeArguments)}.{displayName}";
- }
-
- return $"{type.Namespace}.{displayName}";
- }
-
- // Atomically get or build the display string for the current type.
- return DisplayNames.GetValue(type, t =>
- {
- // By-ref types are displayed as T&
- if (t.IsByRef)
- {
- t = t.GetElementType()!;
-
- return $"{FormatDisplayString(t, 0, t.GetGenericArguments())}&";
- }
-
- // Pointer types are displayed as T*
- if (t.IsPointer)
- {
- int depth = 0;
-
- // Calculate the pointer indirection level
- while (t.IsPointer)
- {
- depth++;
- t = t.GetElementType()!;
- }
-
- return $"{FormatDisplayString(t, 0, t.GetGenericArguments())}{new string('*', depth)}";
- }
-
- // Standard path for concrete types
- return FormatDisplayString(t, 0, t.GetGenericArguments());
- });
- }
-
- ///
- /// Returns whether or not a given type is generic.
- ///
- /// The input type.
- /// Whether or not the input type is generic.
- [Pure]
- private static bool IsGenericType(this Type type)
- {
-#if NETSTANDARD1_4
- return type.GetTypeInfo().IsGenericType;
-#else
- return type.IsGenericType;
-#endif
- }
-
-#if NETSTANDARD1_4
- ///
- /// Returns an array of types representing the generic arguments.
- ///
- /// The input type.
- /// An array of types representing the generic arguments.
- [Pure]
- private static Type[] GetGenericArguments(this Type type)
- {
- return type.GetTypeInfo().GenericTypeParameters;
- }
-
- ///
- /// Returns whether is an instance of .
- ///
- /// The input type.
- /// The type to check against.
- /// if is an instance of , otherwise.
- [Pure]
- internal static bool IsInstanceOfType(this Type type, object value)
- {
- return type.GetTypeInfo().IsAssignableFrom(value.GetType().GetTypeInfo());
- }
-#endif
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Extensions/ValueTypeExtensions.cs b/Microsoft.Toolkit.Diagnostics/Extensions/ValueTypeExtensions.cs
deleted file mode 100644
index 8f1e6fbe97a..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Extensions/ValueTypeExtensions.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Diagnostics.Contracts;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helpers for working with value types.
- ///
- public static class ValueTypeExtensions
- {
- ///
- /// Gets the table of hex characters (doesn't allocate, maps to .text section, see ).
- ///
- private static ReadOnlySpan HexCharactersTable => new[]
- {
- (byte)'0', (byte)'1', (byte)'2', (byte)'3',
- (byte)'4', (byte)'5', (byte)'6', (byte)'7',
- (byte)'8', (byte)'9', (byte)'A', (byte)'B',
- (byte)'C', (byte)'D', (byte)'E', (byte)'F'
- };
-
- ///
- /// Returns a hexadecimal representation of a given value, left-padded and ordered as big-endian.
- ///
- /// The input type to format to .
- /// The input value to format to .
- ///
- /// The hexadecimal representation of (with the '0x' prefix), left-padded to byte boundaries and ordered as big-endian.
- ///
- ///
- /// As a byte (8 bits) is represented by two hexadecimal digits (each representing a group of 4 bytes), each
- /// representation will always contain an even number of digits. For instance:
- ///
- /// Console.WriteLine(1.ToHexString()); // "0x01"
- /// Console.WriteLine(((byte)255).ToHexString()); // "0xFF"
- /// Console.WriteLine((-1).ToHexString()); // "0xFFFFFFFF"
- ///
- ///
- [Pure]
- [SkipLocalsInit]
- public static unsafe string ToHexString(this T value)
- where T : unmanaged
- {
- int
- sizeOfT = Unsafe.SizeOf(),
- bufferSize = (2 * sizeOfT) + 2;
- char* p = stackalloc char[bufferSize];
-
- p[0] = '0';
- p[1] = 'x';
-
- ref byte rh = ref MemoryMarshal.GetReference(HexCharactersTable);
-
- for (int i = 0, j = bufferSize - 2; i < sizeOfT; i++, j -= 2)
- {
- byte b = ((byte*)&value)[i];
- int
- low = b & 0x0F,
- high = (b & 0xF0) >> 4;
-
- p[j + 1] = (char)Unsafe.Add(ref rh, low);
- p[j] = (char)Unsafe.Add(ref rh, high);
- }
-
- return new string(p, 0, bufferSize);
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.g.cs b/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.g.cs
deleted file mode 100644
index 454bc3b7d70..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.g.cs
+++ /dev/null
@@ -1,1827 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-// =====================
-// Auto generated file
-// =====================
-
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helper methods to verify conditions when running code.
- ///
- public static partial class Guard
- {
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(Span span, string name)
- {
- if (span.Length == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(span, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(Span span, string name)
- {
- if (span.Length != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmptyWithSpan(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(Span span, int size, string name)
- {
- if (span.Length == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(Span span, int size, string name)
- {
- if (span.Length != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(Span span, int size, string name)
- {
- if (span.Length > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(Span span, int size, string name)
- {
- if (span.Length >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(Span span, int size, string name)
- {
- if (span.Length < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(Span span, int size, string name)
- {
- if (span.Length <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(Span source, Span destination, string name)
- {
- if (source.Length == destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(Span source, Span destination, string name)
- {
- if (source.Length <= destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, Span span, string name)
- {
- if ((uint)index < (uint)span.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, span, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, Span span, string name)
- {
- if ((uint)index >= (uint)span.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, span, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(ReadOnlySpan span, string name)
- {
- if (span.Length == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(span, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(ReadOnlySpan span, string name)
- {
- if (span.Length != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmptyWithReadOnlySpan(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ReadOnlySpan span, int size, string name)
- {
- if (span.Length == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(ReadOnlySpan span, int size, string name)
- {
- if (span.Length != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(ReadOnlySpan span, int size, string name)
- {
- if (span.Length > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(ReadOnlySpan span, int size, string name)
- {
- if (span.Length >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(ReadOnlySpan span, int size, string name)
- {
- if (span.Length < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(span, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ReadOnlySpan span, int size, string name)
- {
- if (span.Length <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(span, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ReadOnlySpan source, Span destination, string name)
- {
- if (source.Length == destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ReadOnlySpan source, Span destination, string name)
- {
- if (source.Length <= destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, ReadOnlySpan span, string name)
- {
- if ((uint)index < (uint)span.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, span, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, ReadOnlySpan span, string name)
- {
- if ((uint)index >= (uint)span.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, span, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(Memory memory, string name)
- {
- if (memory.Length == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(memory, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(Memory memory, string name)
- {
- if (memory.Length != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty>(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(Memory memory, int size, string name)
- {
- if (memory.Length == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(Memory memory, int size, string name)
- {
- if (memory.Length != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(Memory memory, int size, string name)
- {
- if (memory.Length > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(Memory memory, int size, string name)
- {
- if (memory.Length >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(Memory memory, int size, string name)
- {
- if (memory.Length < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(Memory memory, int size, string name)
- {
- if (memory.Length <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(Memory source, Memory destination, string name)
- {
- if (source.Length == destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(Memory source, Memory destination, string name)
- {
- if (source.Length <= destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, Memory memory, string name)
- {
- if ((uint)index < (uint)memory.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, memory, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, Memory memory, string name)
- {
- if ((uint)index >= (uint)memory.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, memory, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(ReadOnlyMemory memory, string name)
- {
- if (memory.Length == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(memory, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(ReadOnlyMemory memory, string name)
- {
- if (memory.Length != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty>(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(memory, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ReadOnlyMemory memory, int size, string name)
- {
- if (memory.Length <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(memory, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ReadOnlyMemory source, Memory destination, string name)
- {
- if (source.Length == destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ReadOnlyMemory source, Memory destination, string name)
- {
- if (source.Length <= destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, ReadOnlyMemory memory, string name)
- {
- if ((uint)index < (uint)memory.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, memory, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, ReadOnlyMemory memory, string name)
- {
- if ((uint)index >= (uint)memory.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, memory, name);
- }
-
- ///
- /// Asserts that the input array instance must be empty.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(T[] array, string name)
- {
- if (array.Length == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(array, name);
- }
-
- ///
- /// Asserts that the input array instance must not be empty.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(T[] array, string name)
- {
- if (array.Length != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty(name);
- }
-
- ///
- /// Asserts that the input array instance must have a size of a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(T[] array, int size, string name)
- {
- if (array.Length == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(array, size, name);
- }
-
- ///
- /// Asserts that the input array instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(T[] array, int size, string name)
- {
- if (array.Length != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(array, size, name);
- }
-
- ///
- /// Asserts that the input array instance must have a size over a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(T[] array, int size, string name)
- {
- if (array.Length > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(array, size, name);
- }
-
- ///
- /// Asserts that the input array instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(T[] array, int size, string name)
- {
- if (array.Length >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(array, size, name);
- }
-
- ///
- /// Asserts that the input array instance must have a size of less than a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(T[] array, int size, string name)
- {
- if (array.Length < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(array, size, name);
- }
-
- ///
- /// Asserts that the input array instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input array instance.
- /// The input array instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(T[] array, int size, string name)
- {
- if (array.Length <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(array, size, name);
- }
-
- ///
- /// Asserts that the source array instance must have the same size of a destination array instance.
- ///
- /// The item of items in the input array instance.
- /// The source array instance to check the size for.
- /// The destination array instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(T[] source, T[] destination, string name)
- {
- if (source.Length == destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the source array instance must have a size of less than or equal to that of a destination array instance.
- ///
- /// The item of items in the input array instance.
- /// The source array instance to check the size for.
- /// The destination array instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(T[] source, T[] destination, string name)
- {
- if (source.Length <= destination.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, destination, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given array instance.
- ///
- /// The item of items in the input array instance.
- /// The input index to be used to access .
- /// The input array instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, T[] array, string name)
- {
- if ((uint)index < (uint)array.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, array, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given array instance.
- ///
- /// The item of items in the input array instance.
- /// The input index to be used to access .
- /// The input array instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, T[] array, string name)
- {
- if ((uint)index >= (uint)array.Length)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, array, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(List list, string name)
- {
- if (list.Count == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty((ICollection)list, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(List list, string name)
- {
- if (list.Count != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty>(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(List list, int size, string name)
- {
- if (list.Count == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(List list, int size, string name)
- {
- if (list.Count != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(List list, int size, string name)
- {
- if (list.Count > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(List list, int size, string name)
- {
- if (list.Count >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(List list, int size, string name)
- {
- if (list.Count < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(List list, int size, string name)
- {
- if (list.Count <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo((ICollection)list, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(List source, List destination, string name)
- {
- if (source.Count == destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo((ICollection)source, destination.Count, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(List source, List destination, string name)
- {
- if (source.Count <= destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo((ICollection)source, destination.Count, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, List list, string name)
- {
- if ((uint)index < (uint)list.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, (ICollection)list, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, List list, string name)
- {
- if ((uint)index >= (uint)list.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, (ICollection)list, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(ICollection collection, string name)
- {
- if (collection.Count == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(collection, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(ICollection collection, string name)
- {
- if (collection.Count != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty>(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ICollection collection, int size, string name)
- {
- if (collection.Count == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(ICollection collection, int size, string name)
- {
- if (collection.Count != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(ICollection collection, int size, string name)
- {
- if (collection.Count > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(ICollection collection, int size, string name)
- {
- if (collection.Count >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(ICollection collection, int size, string name)
- {
- if (collection.Count < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ICollection collection, int size, string name)
- {
- if (collection.Count <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(ICollection source, ICollection destination, string name)
- {
- if (source.Count == destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination.Count, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(ICollection source, ICollection destination, string name)
- {
- if (source.Count <= destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination.Count, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, ICollection collection, string name)
- {
- if ((uint)index < (uint)collection.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, collection, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, ICollection collection, string name)
- {
- if ((uint)index >= (uint)collection.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, collection, name);
- }
-
- ///
- /// Asserts that the input instance must be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(IReadOnlyCollection collection, string name)
- {
- if (collection.Count == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(collection, name);
- }
-
- ///
- /// Asserts that the input instance must not be empty.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(IReadOnlyCollection collection, string name)
- {
- if (collection.Count != 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty>(name);
- }
-
- ///
- /// Asserts that the input instance must have a size of a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size over a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(collection, size, name);
- }
-
- ///
- /// Asserts that the input instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input instance.
- /// The input instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(IReadOnlyCollection collection, int size, string name)
- {
- if (collection.Count <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(collection, size, name);
- }
-
- ///
- /// Asserts that the source instance must have the same size of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(IReadOnlyCollection source, ICollection destination, string name)
- {
- if (source.Count == destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination.Count, name);
- }
-
- ///
- /// Asserts that the source instance must have a size of less than or equal to that of a destination instance.
- ///
- /// The item of items in the input instance.
- /// The source instance to check the size for.
- /// The destination instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(IReadOnlyCollection source, ICollection destination, string name)
- {
- if (source.Count <= destination.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, destination.Count, name);
- }
-
- ///
- /// Asserts that the input index is valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, IReadOnlyCollection collection, string name)
- {
- if ((uint)index < (uint)collection.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, collection, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given instance.
- ///
- /// The item of items in the input instance.
- /// The input index to be used to access .
- /// The input instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, IReadOnlyCollection collection, string name)
- {
- if ((uint)index >= (uint)collection.Count)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, collection, name);
- }
- }
-}
diff --git a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.tt b/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.tt
deleted file mode 100644
index 22bf00947e7..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Collection.tt
+++ /dev/null
@@ -1,301 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-<#@include file="TypeInfo.ttinclude" #>
-using System;
-using System.Collections.Generic;
-using System.Runtime.CompilerServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helper methods to verify conditions when running code.
- ///
- public static partial class Guard
- {
-<#
-GenerateTextForItems(EnumerableTypes, item =>
-{
-#>
- ///
- /// Asserts that the input <#=item.XmlType#> instance must be empty.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEmpty(<#=item.Type#> <#=item.Name#>, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> == 0)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEmpty(<#=item.Cast#><#=item.Name#>, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must not be empty.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == 0.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEmpty(<#=item.Type#> <#=item.Name#>, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> != 0)
- {
- return;
- }
-
-<#
- if (item.Type == "Span")
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForIsNotEmptyWithSpan(name);
-<#
- }
- else if (item.Type == "ReadOnlySpan")
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForIsNotEmptyWithReadOnlySpan(name);
-<#
- }
- else
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForIsNotEmpty<<#=item.Type#>>(name);
-<#
- }
-#>
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size of a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> == size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size not equal to a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is == .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeNotEqualTo(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> != size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeNotEqualTo(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size over a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is <= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThan(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> > size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThan(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size of at least or equal to a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is < .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeGreaterThanOrEqualTo(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> >= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeGreaterThanOrEqualTo(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size of less than a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is >= .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThan(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> < size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThan(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the input <#=item.XmlType#> instance must have a size of less than or equal to a specified value.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input <#=item.XmlType#> instance to check the size for.
- /// The target size to test.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(<#=item.Type#> <#=item.Name#>, int size, string name)
- {
- if (<#=item.Name#>.<#=item.Size#> <= size)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(<#=item.Cast#><#=item.Name#>, size, name);
- }
-
- ///
- /// Asserts that the source <#=item.XmlType#> instance must have the same size of a destination <#=item.XmlType#> instance.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The source <#=item.XmlType#> instance to check the size for.
- /// The destination <#=item.XmlType#> instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is != the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeEqualTo(<#=item.Type#> source, <#=item.DestinationType#> destination, string name)
- {
- if (source.<#=item.Size#> == destination.<#=item.Size#>)
- {
- return;
- }
-
-<#
- if (item.HasCountProperty)
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(<#=item.Cast#>source, destination.<#=item.Size#>, name);
-<#
- }
- else
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(source, <#=item.Cast#>destination, name);
-<#
- }
-#>
- }
-
- ///
- /// Asserts that the source <#=item.XmlType#> instance must have a size of less than or equal to that of a destination <#=item.XmlType#> instance.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The source <#=item.XmlType#> instance to check the size for.
- /// The destination <#=item.XmlType#> instance to check the size for.
- /// The name of the input parameter being tested.
- /// Thrown if the size of is > the one of .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void HasSizeLessThanOrEqualTo(<#=item.Type#> source, <#=item.DestinationType#> destination, string name)
- {
- if (source.<#=item.Size#> <= destination.<#=item.Size#>)
- {
- return;
- }
-
-<#
- if (item.HasCountProperty)
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForHasSizeEqualTo(<#=item.Cast#>source, destination.<#=item.Size#>, name);
-<#
- }
- else
- {
-#>
- ThrowHelper.ThrowArgumentExceptionForHasSizeLessThanOrEqualTo(source, <#=item.Cast#>destination, name);
-<#
- }
-#>
- }
-
- ///
- /// Asserts that the input index is valid for a given <#=item.XmlType#> instance.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input index to be used to access .
- /// The input <#=item.XmlType#> instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is not valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRangeFor(int index, <#=item.Type#> <#=item.Name#>, string name)
- {
-<#
- // Here we're leveraging the fact that signed integers are represented
- // in 2-complement to perform the bounds check with a single compare operation.
- // This is the same trick used throughout CoreCLR as well.
- // For more info and code sample, see the original conversation here:
- // https://github.com/CommunityToolkit/WindowsCommunityToolkit/pull/3131#discussion_r390682835
-#>
- if ((uint)index < (uint)<#=item.Name#>.<#=item.Size#>)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRangeFor(index, <#=item.Cast#><#=item.Name#>, name);
- }
-
- ///
- /// Asserts that the input index is not valid for a given <#=item.XmlType#> instance.
- ///
- /// The item of items in the input <#=item.XmlType#> instance.
- /// The input index to be used to access .
- /// The input <#=item.XmlType#> instance to use to validate .
- /// The name of the input parameter being tested.
- /// Thrown if is valid to access .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRangeFor(int index, <#=item.Type#> <#=item.Name#>, string name)
- {
- if ((uint)index >= (uint)<#=item.Name#>.<#=item.Size#>)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRangeFor(index, <#=item.Cast#><#=item.Name#>, name);
- }
-<#
-});
-#>
- }
-}
diff --git a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.g.cs b/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.g.cs
deleted file mode 100644
index 953f007578b..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.g.cs
+++ /dev/null
@@ -1,3532 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-// =====================
-// Auto generated file
-// =====================
-
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helper methods to verify conditions when running code.
- ///
- public static partial class Guard
- {
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(byte value, byte target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(byte value, byte target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(byte value, byte maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(byte value, byte maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(byte value, byte minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(byte value, byte minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(byte value, byte minimum, byte maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(byte value, byte minimum, byte maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(byte value, byte minimum, byte maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(byte value, byte minimum, byte maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(byte value, byte minimum, byte maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(byte value, byte minimum, byte maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(sbyte value, sbyte target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(sbyte value, sbyte target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(sbyte value, sbyte maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(sbyte value, sbyte maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(sbyte value, sbyte minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(sbyte value, sbyte minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(sbyte value, sbyte minimum, sbyte maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(short value, short target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(short value, short target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(short value, short maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(short value, short maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(short value, short minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(short value, short minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(short value, short minimum, short maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(short value, short minimum, short maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(short value, short minimum, short maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(short value, short minimum, short maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(short value, short minimum, short maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(short value, short minimum, short maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(ushort value, ushort target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(ushort value, ushort target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(ushort value, ushort maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(ushort value, ushort maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(ushort value, ushort minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(ushort value, ushort minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(ushort value, ushort minimum, ushort maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(char value, char target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(char value, char target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(char value, char maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(char value, char maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(char value, char minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(char value, char minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(char value, char minimum, char maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(char value, char minimum, char maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(char value, char minimum, char maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(char value, char minimum, char maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(char value, char minimum, char maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(char value, char minimum, char maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(int value, int target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(int value, int target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(int value, int maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(int value, int maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(int value, int minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(int value, int minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(int value, int minimum, int maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(int value, int minimum, int maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(int value, int minimum, int maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(int value, int minimum, int maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(int value, int minimum, int maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(int value, int minimum, int maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(uint value, uint target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(uint value, uint target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(uint value, uint maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(uint value, uint maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(uint value, uint minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(uint value, uint minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(uint value, uint minimum, uint maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(uint value, uint minimum, uint maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(uint value, uint minimum, uint maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(uint value, uint minimum, uint maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(uint value, uint minimum, uint maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(uint value, uint minimum, uint maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(float value, float target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(float value, float target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(float value, float maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(float value, float maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(float value, float minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(float value, float minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(float value, float minimum, float maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(float value, float minimum, float maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(float value, float minimum, float maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(float value, float minimum, float maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(float value, float minimum, float maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(float value, float minimum, float maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(long value, long target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(long value, long target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(long value, long maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(long value, long maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(long value, long minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(long value, long minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(long value, long minimum, long maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(long value, long minimum, long maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(long value, long minimum, long maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(long value, long minimum, long maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(long value, long minimum, long maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(long value, long minimum, long maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(ulong value, ulong target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(ulong value, ulong target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(ulong value, ulong maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(ulong value, ulong maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(ulong value, ulong minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(ulong value, ulong minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(ulong value, ulong minimum, ulong maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(double value, double target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(double value, double target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(double value, double maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(double value, double maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(double value, double minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(double value, double minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(double value, double minimum, double maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(double value, double minimum, double maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(double value, double minimum, double maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(double value, double minimum, double maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(double value, double minimum, double maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(double value, double minimum, double maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(decimal value, decimal target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(decimal value, decimal target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(decimal value, decimal maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(decimal value, decimal maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(decimal value, decimal minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(decimal value, decimal minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(decimal value, decimal minimum, decimal maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(nint value, nint target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(nint value, nint target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(nint value, nint maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(nint value, nint maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(nint value, nint minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(nint value, nint minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(nint value, nint minimum, nint maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(nint value, nint minimum, nint maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(nint value, nint minimum, nint maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(nint value, nint minimum, nint maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(nint value, nint minimum, nint maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(nint value, nint minimum, nint maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(nuint value, nuint target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input value to test.
- /// The target value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(nuint value, nuint target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input value to test.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(nuint value, nuint maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(nuint value, nuint maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(nuint value, nuint minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(nuint value, nuint minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or >= .
- ///
- /// This API asserts the equivalent of " in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsInRange(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value >= minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given range.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or < .
- ///
- /// This API asserts the equivalent of " not in [, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotInRange(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value < minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotInRange(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= or >= .
- ///
- /// This API asserts the equivalent of " in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetween(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value > minimum && value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The exclusive minimum value that is accepted.
- /// The exclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > or < .
- ///
- /// This API asserts the equivalent of " not in (, )", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetween(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value <= minimum || value >= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetween(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < or > .
- ///
- /// This API asserts the equivalent of " in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsBetweenOrEqualTo(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value >= minimum && value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsBetweenOrEqualTo(value, minimum, maximum, name);
- }
-
- ///
- /// Asserts that the input value must not be in a given interval.
- ///
- /// The input value to test.
- /// The inclusive minimum value that is accepted.
- /// The inclusive maximum value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= or <= .
- ///
- /// This API asserts the equivalent of " not in [, ]", using arithmetic notation.
- /// The method is generic to avoid boxing the parameters, if they are value types.
- ///
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotBetweenOrEqualTo(nuint value, nuint minimum, nuint maximum, string name)
- {
- if (value < minimum || value > maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsNotBetweenOrEqualTo(value, minimum, maximum, name);
- }
- }
-}
diff --git a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.tt b/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.tt
deleted file mode 100644
index 3f5f0032b06..00000000000
--- a/Microsoft.Toolkit.Diagnostics/Generated/Guard.Comparable.Numeric.tt
+++ /dev/null
@@ -1,274 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-<#@include file="TypeInfo.ttinclude" #>
-using System;
-using System.Runtime.CompilerServices;
-
-namespace Microsoft.Toolkit.Diagnostics
-{
- ///
- /// Helper methods to verify conditions when running code.
- ///
- public static partial class Guard
- {
-<#
-GenerateTextForItems(NumericTypes, typeInfo =>
-{
- var (type, prefix) = typeInfo;
-#>
- ///
- /// Asserts that the input value must be equal to a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The target ="<#=type#>"/> value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is != .
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsEqualTo(<#=type#> value, <#=type#> target, string name)
- {
- if (value == target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be not equal to a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The target ="<#=type#>"/> value to test for.
- /// The name of the input parameter being tested.
- /// Thrown if is == .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsNotEqualTo(<#=type#> value, <#=type#> target, string name)
- {
- if (value != target)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentExceptionForIsNotEqualTo(value, target, name);
- }
-
- ///
- /// Asserts that the input value must be less than a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The exclusive maximum ="<#=type#>"/> value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is >= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThan(<#=type#> value, <#=type#> maximum, string name)
- {
- if (value < maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThan(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be less than or equal to a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The inclusive maximum ="<#=type#>"/> value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is > .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsLessThanOrEqualTo(<#=type#> value, <#=type#> maximum, string name)
- {
- if (value <= maximum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsLessThanOrEqualTo(value, maximum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The exclusive minimum ="<#=type#>"/> value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is <= .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThan(<#=type#> value, <#=type#> minimum, string name)
- {
- if (value > minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThan(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be greater than or equal to a specified value.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The inclusive minimum ="<#=type#>"/> value that is accepted.
- /// The name of the input parameter being tested.
- /// Thrown if is < .
- /// The method is generic to avoid boxing the parameters, if they are value types.
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void IsGreaterThanOrEqualTo(<#=type#> value, <#=type#> minimum, string name)
- {
- if (value >= minimum)
- {
- return;
- }
-
- ThrowHelper.ThrowArgumentOutOfRangeExceptionForIsGreaterThanOrEqualTo(value, minimum, name);
- }
-
- ///
- /// Asserts that the input value must be in a given range.
- ///
- /// The input ="<#=type#>"/> value to test.
- /// The inclusive minimum ="<#=type#>"/> value that is accepted.
- ///