CodeTiger.CodeAnalysis/Guard.cs
/// <summary>
/// Ensures that an argument is not null, throwing an exception if it is null.
/// </summary>
/// <typeparam name="T">The type of the argument.</typeparam>
/// <param name="name">The name of the argument.</param>
/// <param name="value">The value of the argument.</param>
/// <exception cref="ArgumentNullException">Thrown when <paramref name="value"/> is null.</exception>
Ensures that an argument is not null, throwing an exception if it is null.
Ensures that an argument is not null throwing an exception if it is null .
public static void ArgumentIsNotNull<T>(string name, [ValidatedNotNull] T value)
            where T : class
        {
            if (value == null)
            {
                throw new ArgumentNullException(name);
            }
        }
public static void ArgumentIsNotNull < T > ( string name , [ ValidatedNotNull ] T value ) where T : class { if ( value == null ) { throw new ArgumentNullException ( name ) ; } }
Ensures that an argument is not null, throwing an exception if it is null.
Ensures that an argument is not null throwing an exception if it is null .
Thrown when  is null.
Thrown when is null .
name
string
The name of the argument.
The name of the argument .
T
[ValidatedNotNull]
value
The value of the argument.
The value of the argument .
typeparam
The type of the argument.
The type of the argument .