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(); }
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(); }