Ejemplo n.º 1
0
        private async Task <Response> StartOfBeforeRequest(NancyContext ctx, CancellationToken ct)
        {
            ctx.SetFailure(await _failureGenerator.GenerateFailureAsync(ctx, ct));

            await ctx.GetFailure().ExecuteIfRelevantAsync(FailureTime.StartOfBeforeRequest, ctx, ct);

            return(ctx.Response);
        }
Ejemplo n.º 2
0
 private static async Task StartOfAfterRequest(NancyContext ctx, CancellationToken ct)
 {
     await ctx.GetFailure().ExecuteIfRelevantAsync(FailureTime.StartOfAfterRequest, ctx, ct);
 }
Ejemplo n.º 3
0
        private static async Task <Response> EndOfBeforeRequest(NancyContext ctx, CancellationToken ct)
        {
            await ctx.GetFailure().ExecuteIfRelevantAsync(FailureTime.EndOfBeforeRequest, ctx, ct);

            return(ctx.Response);
        }