##// END OF EJS Templates
missing files
missing files

File last commit:

r208:7d07503621fe v2
r237:f2150c16b476 v2
Show More
MockRunnableComponent.cs
52 lines | 1.3 KiB | text/x-csharp | CSharpLexer
/ Implab.Test / Mock / MockRunnableComponent.cs
cin
Added 'Fail' method to RunnableComponent which allows component to move from...
r203 using System;
using Implab.Components;
namespace Implab.Test.Mock {
class MockRunnableComponent : RunnableComponent {
public MockRunnableComponent(bool initialized) : base(initialized) {
}
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 public MockRunnableComponent(bool initialized, bool reusable) : base(initialized, reusable) {
}
cin
Added 'Fail' method to RunnableComponent which allows component to move from...
r203 public Action MockInit {
get;
set;
}
public Func<IPromise> MockStart {
get;
set;
}
public Func<IPromise> MockStop {
get;
set;
}
cin
RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)...
r208 public Action<bool> MockDispose {
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 get;
set;
}
cin
Added 'Fail' method to RunnableComponent which allows component to move from...
r203 protected override IPromise OnStart() {
return MockStart != null ? Safe.Run(MockStart).Chain(base.OnStart) : Safe.Run(base.OnStart);
}
protected override IPromise OnStop() {
return MockStop != null ? Safe.Run(MockStop).Chain(base.OnStop) : Safe.Run(base.OnStop);
}
protected override void OnInitialize() {
if (MockInit != null)
MockInit();
}
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205
cin
RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)...
r208 protected override void Dispose(bool disposing) {
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 if (MockDispose != null)
cin
RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)...
r208 MockDispose(disposing);
base.Dispose(disposing);
cin
Added ResetState to RunnableComponent to reset in case of failure...
r205 }
cin
Added 'Fail' method to RunnableComponent which allows component to move from...
r203 }
}