コード例 #1
0
 public virtual void Start(T parameters)
 {
     this.task = new Task(async() => {
         log.Information($"{Name} is starting ...");
         await UpdateAsync(parameters);
         log.Information($"{Name} is complete.");
         OnComplete();
     });
     task.Start();
 }
コード例 #2
0
 public virtual void Start(T parameters, CancellationTokenSource source)
 {
     this.source = source;
     this.task   = new Task(async() => {
         log.Information($"{Name} is starting ...");
         await UpdateAsync(parameters);
         log.Information($"{Name} is complete.");
         OnComplete();
     }, source.Token);
     task.Start();
 }