comparison Implab.Test/MockPollComponent.cs @ 262:f1696cdc3d7a v3 v3.0.8

Added IInitializable.Initialize() overload Added IRunnable.Start(), IRunnable.Start() overloads Fixed cancellation of the current operation when Stop() is called More tests
author cin
date Mon, 16 Apr 2018 02:12:39 +0300
parents 547a2fc0d93e
children
comparison
equal deleted inserted replaced
261:05a87f575512 262:f1696cdc3d7a
19 if(PollWorker!= null) 19 if(PollWorker!= null)
20 await PollWorker.Invoke(ct); 20 await PollWorker.Invoke(ct);
21 } 21 }
22 22
23 protected async override Task StopInternalAsync(CancellationToken ct) { 23 protected async override Task StopInternalAsync(CancellationToken ct) {
24 await base.StopInternalAsync(ct);
24 if (StopWorker != null) 25 if (StopWorker != null)
25 await StopWorker.Invoke(ct); 26 await StopWorker.Invoke(ct);
26 } 27 }
27 28
28 protected async override Task StartInternalAsync(CancellationToken ct) { 29 protected async override Task StartInternalAsync(CancellationToken ct) {
30 await base.StartInternalAsync(ct);
29 if (StartWorker != null) 31 if (StartWorker != null)
30 await StartWorker.Invoke(ct); 32 await StartWorker.Invoke(ct);
31 } 33 }
32 34
33 35