comparison Implab.Test/Mock/MockRunnableComponent.cs @ 208:7d07503621fe v2

RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool) IRunnable is now disposable Code cleanups, suppressed some CodeAnalysis warnings
author cin
date Sun, 13 Nov 2016 18:28:17 +0300
parents 8200ab154c8a
children
comparison
equal deleted inserted replaced
207:558f34b2fb50 208:7d07503621fe
22 public Func<IPromise> MockStop { 22 public Func<IPromise> MockStop {
23 get; 23 get;
24 set; 24 set;
25 } 25 }
26 26
27 public Action<bool, Exception> MockDispose { 27 public Action<bool> MockDispose {
28 get; 28 get;
29 set; 29 set;
30 } 30 }
31 31
32 protected override IPromise OnStart() { 32 protected override IPromise OnStart() {
40 protected override void OnInitialize() { 40 protected override void OnInitialize() {
41 if (MockInit != null) 41 if (MockInit != null)
42 MockInit(); 42 MockInit();
43 } 43 }
44 44
45 protected override void Dispose(bool disposing, Exception lastError) { 45 protected override void Dispose(bool disposing) {
46 if (MockDispose != null) 46 if (MockDispose != null)
47 MockDispose(disposing, lastError); 47 MockDispose(disposing);
48 base.Dispose(disposing, lastError); 48 base.Dispose(disposing);
49 } 49 }
50 } 50 }
51 } 51 }
52 52