Ejemplo n.º 1
0
 /// <summary>
 /// Create hash
 /// </summary>
 /// <returns></returns>
 public static string GetHashSafe(this JobInfoModel model)
 {
     if (model == null)
     {
         return("null");
     }
     return(model.JobConfiguration.ToString(Formatting.None).ToSha1Hash());
 }
 /// <summary>
 /// Clone
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static JobInfoModel Clone(this JobInfoModel model) {
     if (model == null) {
         return null;
     }
     return new JobInfoModel {
         Id = model.Id,
         Name = model.Name,
         Demands = model.Demands?.Select(d => d.Clone()).ToList(),
         JobConfiguration = model.JobConfiguration?.Copy(),
         JobConfigurationType = model.JobConfigurationType,
         LifetimeData = model.LifetimeData?.Clone(),
         RedundancyConfig = model.RedundancyConfig?.Clone(),
     };
 }
 /// <summary>
 /// Create hash
 /// </summary>
 /// <returns></returns>
 public static string GetHashSafe(this JobInfoModel model) {
     if (model == null || model.JobConfiguration == null) {
         return "null";
     }
     return model.JobConfiguration.ToSha1Hash();
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create event
 /// </summary>
 /// <param name="job"></param>
 public JobInfoEventArgs(JobInfoModel job)
 {
     Job = job;
 }