Exemple #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (Grunt != null)
     {
         Grunt.Validate();
     }
     if (GruntTask != null)
     {
         GruntTask.Validate();
     }
     if (GruntCommand != null)
     {
         GruntCommand.Validate();
     }
 }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the GruntTasking class.
 /// </summary>
 /// <param name="type">Possible values include: 'Assembly',
 /// 'SetOption', 'Kill', 'Connect', 'Disconnect', 'Jobs'</param>
 /// <param name="status">Possible values include: 'Uninitialized',
 /// 'Tasked', 'Progressed', 'Completed', 'Aborted'</param>
 public GruntTasking(string name, int gruntId, int gruntCommandId, int?id = default(int?), Grunt grunt = default(Grunt), int?gruntTaskId = default(int?), GruntTask gruntTask = default(GruntTask), GruntTaskingType?type = default(GruntTaskingType?), IList <string> parameters = default(IList <string>), GruntCommand gruntCommand = default(GruntCommand), GruntTaskingStatus?status = default(GruntTaskingStatus?), System.DateTime?taskingTime = default(System.DateTime?), System.DateTime?completionTime = default(System.DateTime?))
 {
     Id             = id;
     Name           = name;
     GruntId        = gruntId;
     Grunt          = grunt;
     GruntTaskId    = gruntTaskId;
     GruntTask      = gruntTask;
     Type           = type;
     Parameters     = parameters;
     GruntCommandId = gruntCommandId;
     GruntCommand   = gruntCommand;
     Status         = status;
     TaskingTime    = taskingTime;
     CompletionTime = completionTime;
     CustomInit();
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the GruntTaskOption class.
 /// </summary>
 public GruntTaskOption(int?id = default(int?), string name = default(string), string value = default(string), string description = default(string), IList <string> suggestedValues = default(IList <string>), bool?optional = default(bool?), bool?displayInCommand = default(bool?), int?gruntTaskId = default(int?), GruntTask task = default(GruntTask))
 {
     Id               = id;
     Name             = name;
     Value            = value;
     Description      = description;
     SuggestedValues  = suggestedValues;
     Optional         = optional;
     DisplayInCommand = displayInCommand;
     GruntTaskId      = gruntTaskId;
     Task             = task;
     CustomInit();
 }