public async Task <PipeResult <int> > ExecuteAsync( IntModel model, IPipeCache pipeCache = null) { model.Integer += 2; pipeCache.SetSafely <int>("2", model.Integer); return(await Task.FromResult(PipeResult <int> .DefaultSuccessful .SetValue(model.Integer))); }
public async Task <PipeResult <int> > ExecuteAsync( IntModel model, IPipeCache pipeCache = null) { _restrictionTester.IncrementCounter(); await Task.Delay(100); model.Integer += 3; pipeCache.SetSafely <int>("3", model.Integer); _restrictionTester.DecrementCounter(); return(PipeResult <int> .DefaultSuccessful .SetValue(model.Integer)); }