Example #1
0
 ///<summary>
 /// <para>Throws <see cref="ObjectIsNullContractViolationException"/> if any expected value is null.</para>
 /// <para>Throws <see cref="StringIsEmptyContractViolationException"/> if any inspected value is an empty string.</para>
 /// </summary>
 public static Inspected <string> NotNullOrEmpty(this Inspected <string> me)
 {
     me.NotNull(); //We want the proper exceptions
     return(me.Inspect(inspected => inspected != String.Empty,
                       badValue => new StringIsEmptyContractViolationException(badValue)));
 }