Esempio n. 1
0
 public async Task <PipelineResponse <TOut> > Run(Func <Task <PipelineResponse <TOut> > > func)
 {
     try
     {
         return(await func());
     }
     catch (System.Exception ex)
     {
         return(PipelineResponse.Fail <TOut>(ex, "Unhandled exception"));
     }
 }
Esempio n. 2
0
            public async Task <PipelineResponse <ModelResponse> > Retrieve(ModelRequest input)
            {
                try
                {
                    var response = await _dbThing.GetModel(input);

                    return(PipelineResponse.Ok <ModelResponse>(response));
                }
                catch (Exception ex)
                {
                    return(PipelineResponse.Fail <ModelResponse>(ex, "Unhandled exception"));
                }
            }