Common input and integrity validation routines for Visual Studio and other applications
Перейти к файлу
Andrew Arnott b8a845b5c2
Build stable 17.12
2024-09-06 09:22:32 -06:00
.azuredevops Enable dependabot for Azure Repos 2023-06-07 14:30:51 -06:00
.config Bump dotnet-coverage from 17.11.3 to 17.11.5 (#278) 2024-08-12 08:11:13 -06:00
.github Merge branch 'main' into microbuild 2024-07-15 15:58:42 -06:00
.vscode Merge remote-tracking branch 'libtemplate/microbuild' into dev/andarno/apiscan-auth 2024-03-18 16:57:59 -06:00
azure-pipelines Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-08-22 09:20:38 -06:00
loc Juno: check in to JUNO/hb_57c66d8e-4664-4e40-9402-22a8113ce71c_20231013110942830. (#222) 2023-10-16 14:05:02 -06:00
src Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-08-21 10:06:51 -06:00
test Add `Verify.Operation` overloads that only load the string resource on failures 2024-07-22 10:28:37 -06:00
tools Merge remote-tracking branch 'libtemplate/microbuild' into dev/andarno/libtemplateUpdate 2023-06-12 08:52:12 -06:00
.editorconfig Enable CA2016: forward the CancellationToken 2024-07-17 22:28:10 -06:00
.gitattributes Use LF line endings for plist files 2023-02-16 13:02:03 -07:00
.gitignore Ignore .sarif files 2024-06-28 07:03:43 -06:00
.prettierrc.yaml Recommend prettier 2024-02-09 19:54:55 +00:00
CONTRIBUTING.md
Directory.Build.props Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-06-28 14:22:21 -06:00
Directory.Build.rsp
Directory.Build.targets Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-06-28 14:22:21 -06:00
Directory.Packages.props Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-08-22 09:20:38 -06:00
LICENSE
Microsoft.VisualStudio.Validation.sln
README.md
SECURITY.md
azure-pipelines.yml Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-02-27 14:13:49 -07:00
azurepipelines-coverage.yml Post code coverage diff comments for AzDO PRs 2024-08-15 09:04:25 -06:00
global.json Merge branch 'main' into microbuild 2024-08-15 09:05:06 -06:00
init.cmd
init.ps1 Merge remote-tracking branch 'libtemplate/microbuild' into libtemplateUpdate 2024-02-05 12:29:13 -07:00
nuget.config Drop test-tools as a nuget feed source 2023-02-27 15:23:59 -07:00
settings.VisualStudio.json Enable auto-format on save in VS and VS Code 2023-11-22 13:42:47 -07:00
stylecop.json
version.json Build stable 17.12 2024-09-06 09:22:32 -06:00

README.md

Microsoft.VisualStudio.Validation

NuGet package Build Status codecov

This project is available as the Microsoft.VisualStudio.Validation NuGet package.

Basic input validation via the Requires class throws an ArgumentException.

Requires.NotNull(arg1, nameof(arg1));
Requires.NotNullOrEmpty(arg2, nameof(arg2));

State validation via the Verify class throws an InvalidOperationException.

Verify.Operation(condition, "some error occurred.");

Internal integrity checks via the Assumes class throws an InternalErrorException.

Assumes.True(condition, "some error");

Warning signs that should not throw exceptions via the Report class.

Report.IfNot(condition, "some error");