##// END OF EJS Templates
Fixed promise rejection when there is not specified error handler in the reaction....
Fixed promise rejection when there is not specified error handler in the reaction. FIXED SPELLING IN THE XML CONTAINER CONFIGURATION signleton->singleton Code cleanup Update tests make them working on dotnet core

File last commit:

r289:95896f882995 v3.0.14 v3
r295:28af686e24f7 default
Show More
MockPollComponent.cs
36 lines | 1.1 KiB | text/x-csharp | CSharpLexer
/ Implab.Test / src / MockPollComponent.cs
cin
Added tests for Implab.ServiceHost.Unity configuration loader.
r289 using System;
using System.Threading;
using System.Threading.Tasks;
using Implab.Components;
namespace Implab.Test {
public class MockPollComponent : PollingComponent {
public Func<CancellationToken,Task> PollWorker { get; set;}
public Func<CancellationToken, Task> StartWorker { get; set; }
public Func<CancellationToken, Task> StopWorker { get; set; }
public MockPollComponent(bool initialized) : base(initialized) {
}
protected async override Task Poll(CancellationToken ct) {
if(PollWorker!= null)
await PollWorker.Invoke(ct);
}
protected async override Task StopInternalAsync(CancellationToken ct) {
await base.StopInternalAsync(ct);
if (StopWorker != null)
await StopWorker.Invoke(ct);
}
protected async override Task StartInternalAsync(CancellationToken ct) {
await base.StartInternalAsync(ct);
if (StartWorker != null)
await StartWorker.Invoke(ct);
}
}
}