Exemplo n.º 1
0
 public TestJob(int sleep_time, PriorityHints hints, params Resource [] resources)
     : base(string.Format("{0} ( {1}, {2})", job_count++, hints, resources.Aggregate("", (a, b) => a += b.Id + " ")),
            hints,
            resources)
 {
     this.sleep_time = sleep_time;
 }
Exemplo n.º 2
0
 public Job(string title, PriorityHints hints, params Resource [] resources)
 {
     Title         = title;
     PriorityHints = hints;
     SetResources(resources);
 }
Exemplo n.º 3
0
 public static bool Has <T> (this T job, PriorityHints hints) where T : Job
 {
     return((job.PriorityHints & hints) == hints);
 }
Exemplo n.º 4
0
 internal static IEnumerable <T> With <T> (this IEnumerable <T> source, PriorityHints hints) where T : Job
 {
     return(source.Where(j => j.Has(hints)));
 }
Exemplo n.º 5
0
 public Job (string title, PriorityHints hints, params Resource [] resources)
 {
     Title = title;
     PriorityHints = hints;
     SetResources (resources);
 }
Exemplo n.º 6
0
 public SimpleAsyncJob (string name, PriorityHints hints, params Resource [] resources)
     : base (name, hints, resources)
 {
 }
Exemplo n.º 7
0
 public TestJob (int sleep_time, PriorityHints hints, params Resource [] resources)
     : base (String.Format ("{0} ( {1}, {2})", job_count++, hints, resources.Aggregate ("", (a, b) => a += b.Id + " ")),
             hints,
             resources)
 {
     this.sleep_time = sleep_time;
 }
 public SimpleAsyncJob(string name, PriorityHints hints, params Resource [] resources)
     : base(name, hints, resources)
 {
 }
Exemplo n.º 9
0
 public ThreadPoolJob (string name, PriorityHints hints, params Resource [] resources)
     : base (name, hints, resources)
 {
 }