/// <summary> /// Creates a <see cref="Match{T}"/> instance that never matches successfully regardless the value to match. /// </summary> /// <typeparam name="T"> /// The type of the value to match. /// </typeparam> /// <returns> /// A new <see cref="Match{T}"/> instance that never matches successfully. /// </returns> public static Match <T> Never <T>() { return(Match <T> .Create(new Never <T>())); }
/// <summary> /// Creates a <see cref="Match{T}"/> instance that matches successfully when the value to match is not a <c>null</c> reference. /// </summary> /// <typeparam name="T"> /// The type of the value to match. This must be a reference type. /// </typeparam> /// <returns> /// A new <see cref="Match{T}"/> instance that determines whether the value to match is not a <c>null</c> reference. /// </returns> public static Match <T> NotNull <T>() where T : class { return(Match <T> .Create(new NotNull <T>())); }
/// <summary> /// Creates a <see cref="Match{T}"/> instance that always matches successfully regardless the value to match. /// </summary> /// <typeparam name="T"> /// The type of the value to match. /// </typeparam> /// <returns> /// A new <see cref="Match{T}"/> instance that always matches successfully. /// </returns> public static Match <T> Always <T>() { return(Match <T> .Create(new Always <T>())); }