public static void NotNull(object obj, string argName) { if (obj == null) { throw ErrorHelper.ArgNull(argName); } }
public static void NotNullOrEmpty(string value, string argName) { if (string.IsNullOrWhiteSpace(value)) { throw ErrorHelper.ArgNull(argName); } }
public static void PropertyNotNullOrEmpty(string value, string propertyPath) { if (string.IsNullOrWhiteSpace(value)) { throw ErrorHelper.ArgNull(string.Format("Property path {0} cannot be null or empty", propertyPath)); } }
public static void PropertyNotNull(object obj, string propertyPath) { if (obj == null) { throw ErrorHelper.ArgNull(string.Format("Property path {0} cannot be null", propertyPath)); } }
public static string ToText(this byte[] input) { if (input == null) { throw ErrorHelper.ArgNull("input"); } return(Encoding.UTF8.GetString(input)); }