Beispiel #1
0
    /// <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;
    }
Beispiel #2
0
    /// <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));
    }
Beispiel #3
0
    /// <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;
    }
Beispiel #4
0
 /// <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");
 }
Beispiel #5
0
 public static IAsserter NotNullOrEmpty(string arg)
 {
     return(_instance.NotNullOrEmpty(arg));
 }