public override Task StartAsync(CancellationToken token) { Runnable.RunAsync(token); var instance = GetInstance<IRemotingReactiveServiceConnection>(); instance.Configure(Platform.Configuration); instance.Start(); return Task.FromResult(true); }
public void Run(Runnable operation, OperationContext context) { _setRunningOperationContext(context); using (var token = new CancellationTokenSource()) { context.InProgress(token); operation.RunAsync(token.Token); } }
public static async Task PerformRun(CancellationTokenSource cancellationTokenSource, OperationContext context, Runnable operation) { context.InProgress(cancellationTokenSource); try { await operation.RunAsync(cancellationTokenSource.Token).ConfigureAwait(false); context.Success(); } catch (OperationCanceledException) { context.Stopped(); } catch (Exception e) { context.Failure(e); } }
public override Task StartAsync(CancellationToken token) { Runnable.RunAsync(token); return(Task.FromResult(true)); }
public virtual async Task StartAsync(CancellationToken token) { await Runnable.RunAsync(token).ConfigureAwait(false); }
public Task RunAsync(CancellationToken token) { return(_mock.RunAsync(token)); }