예제 #1
0
 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)));
 }
예제 #2
0
        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));
        }