-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathThirdPartyMiddleware.cs
More file actions
30 lines (26 loc) · 909 Bytes
/
ThirdPartyMiddleware.cs
File metadata and controls
30 lines (26 loc) · 909 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
//
namespace FeatureFlagDemo
{
public class ThirdPartyMiddleware
{
//
// The middleware delegate to call after this one finishes processing
private readonly RequestDelegate _next;
private readonly ILogger _logger;
public ThirdPartyMiddleware(RequestDelegate next, ILoggerFactory loggerFactory)
{
_next = next;
_logger = loggerFactory.CreateLogger<ThirdPartyMiddleware>();
}
public async Task Invoke(HttpContext httpContext)
{
_logger.LogInformation($"Third party middleware inward path.");
//
// Call the next middleware delegate in the pipeline
await _next.Invoke(httpContext);
_logger.LogInformation($"Third party middleware outward path.");
}
}
}