public static StringMandateContext IsNull(this StringMandateContext context) { Mandate.That(context, context.Value != null, () => new ArgumentException(context.ParamName)); return(new StringMandateContext(context)); }
public static StringMandateContext IsEmpty(this StringMandateContext context) { Mandate.That(context, context.Value == string.Empty, () => new ArgumentException(context.ParamName)); return(new StringMandateContext(context)); }
public static StringMandateContext IsLengthGreaterThan(this StringMandateContext context, int comparisonValue) { Mandate.That(context, context.Value.Length > comparisonValue, () => new ArgumentOutOfRangeException(context.ParamName, context.Value, string.Empty)); return(new StringMandateContext(context)); }
public static StringMandateContext IsNotNullOrEmpty(this StringMandateContext context) { Mandate.That(context, string.IsNullOrEmpty(context.Value), () => new ArgumentException(context.ParamName)); return(new StringMandateContext(context)); }