コード例 #1
0
 public JobModel(int id, string name, JobState state, RunModel run = null)
 {
     JobID = id;
     JobName = name;
     State = state;
     Run = run;
 }
コード例 #2
0
 /// <summary>
 /// Parses zero or more runs from given string.
 /// </summary>
 /// <param name="responseString"></param>
 /// <returns></returns>
 public static List<RunModel> Parse(string responseString)
 {
     List<RunModel> results = new List<RunModel>();
     string[] runs = responseString.Split('\n');
     foreach (String run in runs)
     {
         try
         {
             if (run.Length == 0) continue;
             var runModel = new RunModel(run);
             results.Add(runModel);
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex);
         }
     }
     return results;
 }
コード例 #3
0
 public void AddRun(RunModel run)
 {
     Run = run;
     State = JobState.Running;
 }