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); }
private static async Task StartOfAfterRequest(NancyContext ctx, CancellationToken ct) { await ctx.GetFailure().ExecuteIfRelevantAsync(FailureTime.StartOfAfterRequest, ctx, ct); }
private static async Task <Response> EndOfBeforeRequest(NancyContext ctx, CancellationToken ct) { await ctx.GetFailure().ExecuteIfRelevantAsync(FailureTime.EndOfBeforeRequest, ctx, ct); return(ctx.Response); }