async Task<PipelineContinuation> ReadRequestEntityBody(ICommunicationContext ctx) { var operation = await DecodeRequest(ctx.PipelineData.Operations); ctx.PipelineData.Operations = operation.Item1 != RequestReadResult.Success ? Enumerable.Empty<IOperation>() : new[] {operation.Item2}; return ctx.PipelineData.Operations.Any() ? PipelineContinuation.Continue : ctx.Respond<OperationResult.BadRequest>(); }
async Task <PipelineContinuation> ReadRequestEntityBody(ICommunicationContext ctx) { var operation = await DecodeRequest(ctx.PipelineData.OperationsAsync); ctx.PipelineData.OperationsAsync = operation.Item1 != RequestReadResult.Success ? Enumerable.Empty <IOperationAsync>() : new[] { operation.Item2 }; return(ctx.PipelineData.OperationsAsync.Any() ? PipelineContinuation.Continue : ctx.Respond <OperationResult.BadRequest>()); }