예제 #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;
 }
예제 #2
0
 public Job(string title, PriorityHints hints, params Resource [] resources)
 {
     Title         = title;
     PriorityHints = hints;
     SetResources(resources);
 }
예제 #3
0
 public static bool Has <T> (this T job, PriorityHints hints) where T : Job
 {
     return((job.PriorityHints & hints) == hints);
 }
예제 #4
0
 internal static IEnumerable <T> With <T> (this IEnumerable <T> source, PriorityHints hints) where T : Job
 {
     return(source.Where(j => j.Has(hints)));
 }
예제 #5
0
파일: Job.cs 프로젝트: Yetangitu/f-spot
 public Job (string title, PriorityHints hints, params Resource [] resources)
 {
     Title = title;
     PriorityHints = hints;
     SetResources (resources);
 }
예제 #6
0
 public SimpleAsyncJob (string name, PriorityHints hints, params Resource [] resources)
     : base (name, hints, resources)
 {
 }
예제 #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)
 {
 }
예제 #9
0
 public ThreadPoolJob (string name, PriorityHints hints, params Resource [] resources)
     : base (name, hints, resources)
 {
 }