In the aspnet-api-versioning I have found out a codeblock:
DefaultApiControllerFilter( IEnumerable<IApiControllerSpecification> pecifications )
{
Arg.NotNull( specifications, nameof( specifications ) );
this.specifications = specifications.ToArray();
}
The interested block is Arg.NotNull( value, "text" );
from the Microsoft
namespace.
And there are several similar asserts in the code. Another example is Contract.Requires()
from System.Diagnostics.Contracts
Tried to search over Microsoft docs about work principles but didn't found info.
So maybe could help to find out how does it work: like postsharp code rewrite, provide runtime conditional check as Debug.Assert
or maybe simply throws exceptions(but it doesn't mention in docs)?