/// <summary> /// Constructs a new WebOperationCriteria. /// </summary> /// <param name="URL">The URL of the operation.</param> /// <param name="fields">A Dictionary containing the data fields of the operation.</param> public WebOperationCriteria(string URL, Dictionary <string, string> fields) { Asserter.NotNullOrEmpty(URL, "WebOperationCriteria.ctor:URL is null or empty"); Asserter.NotNull(fields, "WebOperationCriteria.ctor:fields is null or empty"); this.URL = URL; Fields = fields; }
/// <summary> /// Creates a LoginCriteria with the given username and password. /// </summary> /// <param name="username">The username with which to attempt to login.</param> /// <param name="password">The password with which to attempt to login.</param> /// <returns></returns> public static LoginCriteria Create(string username, string password) { // Sanitize input? Asserter.NotNullOrEmpty(username); Asserter.NotNullOrEmpty(password); return(new LoginCriteria(username, password)); }
/// <summary> /// Constructs a FieldViolation object. /// </summary> /// <param name="ViolatingObject">The GameObject on which the violation occurs.</param> /// <param name="Target">The object causing the violation on the GameObject. May be null.</param> /// <param name="Message">A message containing details about the violation.</param> public FieldViolation(GameObject ViolatingObject, object Target, string Message) { Asserter.NotNull(ViolatingObject); Asserter.NotNullOrEmpty(Message); this.ViolatingObject = ViolatingObject; this.Target = Target; this.Message = Message; }
/// <summary> /// Verifies that the constructed RegisterOperationCriteria is valid. /// </summary> /// <param name="criteria">The RegisterOperationCriteria to inspect.</param> private static void VerifyCriteria(RegisterOperationCriteria criteria) { Asserter.NotNullOrEmpty(criteria.Username, "RegisterOperationCriteria.Builder:username is null or empty"); Asserter.NotNullOrEmpty(criteria.Password, "RegisterOperationCriteria.Builder:password is null or empty"); Asserter.NotNullOrEmpty(criteria.ZipCode, "RegisterOperationCriteria.Builder:zipcode is null or empty"); }
public static IAsserter NotNullOrEmpty(string arg) { return(_instance.NotNullOrEmpty(arg)); }