-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Guard APIs for .NET Standard 2.1 #3167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
michael-hawker
merged 178 commits into
CommunityToolkit:master
from
Sergio0694:feature/guard-apis-netstandard2.1
May 15, 2020
Merged
Changes from 151 commits
Commits
Show all changes
178 commits
Select commit
Hold shift + click to select a range
1c79157
Initial guard APIs added
Sergio0694 0554d2f
Added EqualTo and NotEqualTo APIs
Sergio0694 6dc701f
Merge branch 'master' into feature/guard-apis
Sergio0694 018e5c4
Added more Guard APIs
Sergio0694 8d78ba3
New interval Guard APIs added
Sergio0694 0b76fb9
Added Guard APIs for IEnumerable<T> values
Sergio0694 8028741
Renamed APIs
Sergio0694 cd23275
Added Guard APIs for Stream values
Sergio0694 a54441c
Added Guard APIs for ReadOnlySpan<T> values
Sergio0694 8dee59a
Added Guard APIs for ReadOnlyMemory<T> values
Sergio0694 2d32333
Code refactoring
Sergio0694 19e3bcc
Minor code refactoring
Sergio0694 0ff1f00
Added Guard.IsBitwiseEqualTo<T> API
Sergio0694 9dd8a80
Added Guard.IsNull API
Sergio0694 f2a4500
Code refactoring and optimizations
Sergio0694 b79daa7
Code refactoring
Sergio0694 d44e633
Added Guard.HasSizeNotEqualTo<T> API
Sergio0694 0292f9d
Added Guard size API overloads for the string type
Sergio0694 073a205
Added Guard size API overloads for T[] arrays
Sergio0694 5edef16
Code refactoring
Sergio0694 1a19fea
Removed unnecessary using directives
Sergio0694 d38ad13
Added Guard reference check APIs
Sergio0694 e9108fc
Added new Guaard APIs for string values
Sergio0694 18bb2d4
Improved Guard.IsBitwiseEqualTo<T> API
Sergio0694 2d9536f
Improved Guard.IsNull APIs
Sergio0694 a927dad
Added new size APIs for copy operations
Sergio0694 56a3a18
Added new type test APIs, minor code tweaks
Sergio0694 bbd10a8
Minor bug fixes
Sergio0694 fbb5801
Added Guard APIs for Task values
Sergio0694 eba232e
Minor code tweak
Sergio0694 9071e12
Added new Guard.IsEmpty APIs
Sergio0694 edb1d41
Refactored code to remove unsafe requirement
Sergio0694 d9c83f4
Added Guard.IsInRange<T> APIs
Sergio0694 e63402b
Added missing type checks in Guard.IsBitwiseEqualTo API
Sergio0694 87056c9
Added ValueTypeExtensions.ToHexString API
Sergio0694 0d34c0a
Code refactoring
Sergio0694 497d149
Added ValueTypeExtensions tests
Sergio0694 bc0fc1b
Added general Guard tests
Sergio0694 606cbde
Bug fixes in the Guard class
Sergio0694 f29cd93
Minor speed improvements
Sergio0694 79d2dd4
Code refactoring
Sergio0694 793c769
Removed unnecessary using directives
Sergio0694 8e2f2d8
More speed improvements and API refactoring
Sergio0694 5b58e5e
Refactored/fixed some Guard APIs
Sergio0694 b664c90
More bug fixes
Sergio0694 7f65184
Added Guard tests for array APIs
Sergio0694 4304edd
Fixed the Guard.IsNotEmpty<T> array API
Sergio0694 4802936
Moved exception throwers to separate class
Sergio0694 ed5315a
Moved general Guard throwers to separate class
Sergio0694 1772a0f
Disabled warning for XML overload resolution
Sergio0694 9814d91
Moved array Guard throwers to separate class
Sergio0694 1b78344
Moved stream Guard throwers to separate class
Sergio0694 bc0dc18
Fixed some XML docs
Sergio0694 e000fe0
Moved enumerable Guard throwers to separate class
Sergio0694 21cf16a
Moved task Guard throwers to separate class
Sergio0694 c1b9c8b
Added new Guard APIs for tasks
Sergio0694 c784d4e
Moved string Guard throwers to separate class
Sergio0694 8cf87c3
Moved ReadOnlySpan<T> Guard throwers to separate class
Sergio0694 24e03f5
Added Span<T> APIs to the Guard class
Sergio0694 6f1679b
Moved ReadOnlyMemory<T> Guard throwers to separate class
Sergio0694 7e80e43
Added Memory<T> APIs to the Guard class
Sergio0694 662bb83
Minor code refactoring
Sergio0694 1c334df
Update file headers
Sergio0694 eccc2a6
Removed unnecessary methods
Sergio0694 15ef6a3
Added TypeExtensions.ToTypeString extension
Sergio0694 317fc99
Improved error messages for general Guard APIs
Sergio0694 cb1f3b0
Improved error messages for Enumerable Guard APIs
Sergio0694 23f1504
Improved error messages for stream Guard APIs
Sergio0694 920e69f
Improved error messages for array Guard APIs
Sergio0694 18e661f
Improved error messages for string Guard APIs
Sergio0694 d00e0e3
Improved error messages for task Guard APIs
Sergio0694 6aeedaa
Improved error messages for span Guard APIs
Sergio0694 acafd8a
Improved error messages for memory Guard APIs
Sergio0694 8c7757a
Improved type string for nullable types
Sergio0694 c2fd97c
Improved type string for value tuple types
Sergio0694 8facb7e
Minor performance improvement
Sergio0694 2952e23
Added numeric comparison T4 file
Sergio0694 4991a5c
Updated .gitignore to skip generated files
Sergio0694 714cf31
Moved comparison Guard APIs to separate file
Sergio0694 fa8cc56
Renamed template file, fixed incorrect XML doc
Sergio0694 effb2ed
Fixed missing blank line
Sergio0694 e2e5171
Removed unnecessary type parameters
Sergio0694 4482217
Moved enumerable Guard APIs to separate file
Sergio0694 94872b9
Code refactoring in the enumerable T4 template
Sergio0694 756c842
Renamed a file
Sergio0694 0ecef12
Added empty template for ThrowHelper.Collection
Sergio0694 e093427
Code refactoring in the T4 templates
Sergio0694 9db9cd0
Switched collection throw helpers to T4 generation
Sergio0694 f6e3248
Code refactoring
Sergio0694 deb302b
Merge pull request #7 from Sergio0694/feature/guard-apis-T4
Sergio0694 fcc3c05
Removed incorrect file header
Sergio0694 760972f
Added new Guard.IsInRangeFor API
Sergio0694 8d6cc8a
Updated .gitignore, added generated files to source control
Sergio0694 e3d245f
Added tests for Guard.IsInRangeFor
Sergio0694 d367add
Improved formatting of values in error messages
Sergio0694 6d97f33
Improved error messages
Sergio0694 ec67152
More improvements to the error messages
Sergio0694 b2c3acb
Minor code tweaks
Sergio0694 43b22f0
Added Guard.IsNotOfType APIs
Sergio0694 c8af095
Added Guard.IsNotAssignableToType APIs
Sergio0694 7adfa79
Added Guard.IsDefault<T> APIs
Sergio0694 95b9fd1
Merge branch 'master' into feature/guard-apis
Sergio0694 d4c2d05
Fixed some XML docs
Sergio0694 afd973e
Added missing [Pure] attribute
Sergio0694 96ce238
Fixed typo in a comment
Sergio0694 cb98a02
Removed unnecessary comment after code changes
Sergio0694 5f25e18
Added XML comment for the T4 service
Sergio0694 cf5785c
Added more comments to ToHexString
Sergio0694 801dc93
Suppressed an incorrect code style warning
Sergio0694 b840201
Added more tests for Guard.IsInRange
Sergio0694 818c1eb
Added Guard.IsNotInRangeFor APIs
Sergio0694 caad2f7
Added readme file for the T4 templates
Sergio0694 7134f98
Changed generated files extension to .g.cs to avoid conflicts
Sergio0694 01a7257
Added Guard.IsCloseTo and Guard.IsNotCloseTo APIs
Sergio0694 f33c984
Added tests for IsCloseTo
Sergio0694 1b0f2c9
Updated ".g.cs" extension for generated files
Sergio0694 ef189ba
Removed extra space (typo)
Sergio0694 ac44dad
More tweakes to the Guard.md file
Sergio0694 21115f6
Excluded TypeInfo.g.cs file from .ttinclude from checkout
Sergio0694 67fcd47
Added more info about target ranges for some APIs
Sergio0694 41fea84
Added IsCloseTo overloads for long type
Sergio0694 132d240
Minor code tweaks
Sergio0694 f17aacd
Added comment to describe (uint) cast range check trick
Sergio0694 949134b
Added a nore about the .g.cs files being checked in
Sergio0694 c9283d1
Merge branch 'master' into feature/guard-apis
michael-hawker b599bc1
Added .NET Standard 2.1 target, adjusted imported packages
Sergio0694 68ffb8e
Added [NotNull] attributes when needed
Sergio0694 2dd7e4a
Merge branch 'master' of https://github.com/windows-toolkit/WindowsCo…
Sergio0694 7dd004e
Merge branch 'windows-toolkit-master' into feature/guard-apis-netstan…
Sergio0694 c40e17d
Added flow attributes to bool Guard APIs
Sergio0694 afa5047
Merge pull request #10 from windows-toolkit/master
Sergio0694 a0d8f14
Added missing Guard APIs for the string type
Sergio0694 5d33d35
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 63e558e
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 a6d46b1
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 b2d5a13
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 e8cd4f7
Merge pull request #18 from windows-toolkit/master
Sergio0694 61719e0
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 b1084c6
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 fa8adc1
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 824f2af
Merge branch 'master' into feature/guard-apis-netstandard2.1
azchohfi 454a550
Added shared main unit test project
Sergio0694 7df62ab
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 c260234
Removed duplicate files from UWP unit test project
Sergio0694 8564398
Merge branch 'master' into feature/guard-apis-netstandard2.1
azchohfi 8c62dc3
Merge branch 'feature/guard-apis-netstandard2.1' of https://github.co…
Sergio0694 e806a95
Refactored UWP unit tests project (can't be in same folder as .shproj)
Sergio0694 42030bd
Moved markdown tests back into UWP project
Sergio0694 0754dfb
Added UnitTests.NetCore project
Sergio0694 08467bb
Fixed some styling issues in test projects
Sergio0694 eeabce0
Added .editorconfig file to UniTests.NetCore project too
Sergio0694 5e713fa
Moved .editorconfig file to Shared project folder
Sergio0694 cbc80ef
Merge pull request #19 from windows-toolkit/master
Sergio0694 31a4938
Removed NetCore Tests compilation for Native Configuration.
azchohfi 72861f4
Update Windows Community Toolkit.sln
azchohfi 4079a75
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 d8b3c08
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 6f0e258
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 f0b5bf0
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 6129c69
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 fdaa307
Merge remote-tracking branch 'upstream/master' into master2
Sergio0694 73e277e
Updated multiline comments style
Sergio0694 0be5134
Renamed some Guard APIs
Sergio0694 29b4f58
Merge branch 'master2' into feature/guard-apis-netstandard2.1
Sergio0694 80e67d3
Fixed collections tests, moved to shared project
Sergio0694 2f2aafe
Removed unnecessary [SuppressMessage] attributes
Sergio0694 c30560a
Added internal [NotNull] and [DoesNotReturnIf] attributes
Sergio0694 a2dcde9
Removed build warnings
Sergio0694 1523b58
Removed leftover compiler directives
Sergio0694 b67e5b8
Added Guard.IsTrue/False overloads with custom message
Sergio0694 dc4f747
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 16e35b2
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 1a62ad8
Merge remote-tracking branch 'upstream/master' into feature/guard-api…
Sergio0694 e59c7ab
Fixed test file location after merge
Sergio0694 0c51da8
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 73b4c74
Fixed Span<T> and Unsafe package references
Sergio0694 f4ac2a0
Merge branch 'master' into feature/guard-apis-netstandard2.1
michael-hawker e8f0e7f
Merge branch 'master' into feature/guard-apis-netstandard2.1
Sergio0694 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>netcoreapp2.1;netcoreapp3.1</TargetFrameworks> | ||
| <IsPackable>false</IsPackable> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" /> | ||
| <PackageReference Include="MSTest.TestAdapter" Version="2.1.0" /> | ||
| <PackageReference Include="MSTest.TestFramework" Version="2.1.0" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\Microsoft.Toolkit\Microsoft.Toolkit.csproj" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="..\UnitTests.Shared\UnitTests.Shared.projitems" Label="Shared" /> | ||
|
|
||
| </Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <PropertyGroup> | ||
| <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
| <HasSharedItems>true</HasSharedItems> | ||
| <SharedGUID>4e9466d1-d5aa-46ac-801b-c8fdab79f0d4</SharedGUID> | ||
| </PropertyGroup> | ||
| <PropertyGroup Label="Configuration"> | ||
| <Import_RootNamespace>UnitTests.Shared</Import_RootNamespace> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Diagnostics\Test_Guard.Array.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Diagnostics\Test_Guard.Comparable.Numeric.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Diagnostics\Test_Guard.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Extensions\Test_ArrayExtensions.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Extensions\Test_TypeExtensions.cs" /> | ||
| <Compile Include="$(MSBuildThisFileDirectory)Extensions\Test_ValueTypeExtensions.cs" /> | ||
| </ItemGroup> | ||
| </Project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.