ehtick / vs-validation

Common input and integrity validation routines for Visual Studio and other applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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");

About

Common input and integrity validation routines for Visual Studio and other applications

License:Other


Languages

Language:C# 62.9%Language:PowerShell 36.6%Language:Batchfile 0.3%Language:Visual Basic .NET 0.1%