public static TaskContext CreateTask(string path, DateTime startDate, TaskRunOrderImportance importance) { var assembly = Assembly.LoadFrom(path); var context = new TaskContext(importance) { Assembly = assembly, IsExecuting = false, AssemblyPath = path, StartDate = startDate, }; return(context); }
public TaskContext(TaskRunOrderImportance runOrderImportance) { UUID = Guid.NewGuid().ToString(); TimeoutInterval = runOrderImportance.GetHashCode() * 2; RunOrderImportance = runOrderImportance; }