Updated to C# 12
This commit is contained in:
@@ -8,23 +8,16 @@ namespace AMWD.Common.AspNetCore.Security.PathProtection
|
||||
/// <summary>
|
||||
/// Implements a check to provide protected paths.
|
||||
/// </summary>
|
||||
public class ProtectedPathMiddleware
|
||||
/// <remarks>
|
||||
/// Initializes a new instance of the <see cref="ProtectedPathExtensions"/> class.
|
||||
/// </remarks>
|
||||
/// <param name="next">The following delegate in the process chain.</param>
|
||||
/// <param name="options">The options to configure the middleware.</param>
|
||||
public class ProtectedPathMiddleware(RequestDelegate next, ProtectedPathOptions options)
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
private readonly PathString _path;
|
||||
private readonly string _policyName;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProtectedPathExtensions"/> class.
|
||||
/// </summary>
|
||||
/// <param name="next">The following delegate in the process chain.</param>
|
||||
/// <param name="options">The options to configure the middleware.</param>
|
||||
public ProtectedPathMiddleware(RequestDelegate next, ProtectedPathOptions options)
|
||||
{
|
||||
_next = next;
|
||||
_path = options.Path;
|
||||
_policyName = options.PolicyName;
|
||||
}
|
||||
private readonly RequestDelegate _next = next;
|
||||
private readonly PathString _path = options.Path;
|
||||
private readonly string _policyName = options.PolicyName;
|
||||
|
||||
/// <summary>
|
||||
/// The delegate invokation.
|
||||
|
||||
Reference in New Issue
Block a user