CorsMiddleware 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CorsMiddleware(RequestDelegate, ICorsService, CorsPolicy)
- Source:
- CorsMiddleware.cs
- Source:
- CorsMiddleware.cs
注意
This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
[System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")]
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
[<System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")>]
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policy As CorsPolicy)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policy
- CorsPolicy
可以应用的 的 CorsPolicy 实例。
- 属性
适用于
CorsMiddleware(RequestDelegate, ICorsService, ICorsPolicyProvider)
- Source:
- CorsMiddleware.cs
- Source:
- CorsMiddleware.cs
注意
This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::ICorsPolicyProvider ^ policyProvider);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider);
[System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")]
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
[<System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")>]
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policyProvider As ICorsPolicyProvider)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policyProvider
- ICorsPolicyProvider
可以获取 的策略 CorsPolicy提供程序。
- 属性
适用于
CorsMiddleware(RequestDelegate, ICorsService, ILoggerFactory)
- Source:
- CorsMiddleware.cs
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, loggerFactory As ILoggerFactory)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- loggerFactory
- ILoggerFactory
ILoggerFactory 的一个实例。
适用于
CorsMiddleware(RequestDelegate, ICorsService, CorsPolicy, ILoggerFactory)
- Source:
- CorsMiddleware.cs
- Source:
- CorsMiddleware.cs
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::CorsPolicy ^ policy, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy policy, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.CorsPolicy * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policy As CorsPolicy, loggerFactory As ILoggerFactory)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policy
- CorsPolicy
可以应用的 的 CorsPolicy 实例。
- loggerFactory
- ILoggerFactory
ILoggerFactory 的一个实例。
适用于
CorsMiddleware(RequestDelegate, ICorsService, ICorsPolicyProvider, ILoggerFactory)
- Source:
- CorsMiddleware.cs
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::ICorsPolicyProvider ^ policyProvider, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policyProvider As ICorsPolicyProvider, loggerFactory As ILoggerFactory)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policyProvider
- ICorsPolicyProvider
可以获取 的策略 CorsPolicy提供程序。
- loggerFactory
- ILoggerFactory
ILoggerFactory 的一个实例。
适用于
CorsMiddleware(RequestDelegate, ICorsService, ICorsPolicyProvider, String)
- Source:
- CorsMiddleware.cs
- Source:
- CorsMiddleware.cs
注意
This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::ICorsPolicyProvider ^ policyProvider, System::String ^ policyName);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, string policyName);
[System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")]
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, string policyName);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider * string -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
[<System.Obsolete("This constructor has been replaced with an equivalent constructor which requires an ILoggerFactory")>]
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider * string -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policyProvider As ICorsPolicyProvider, policyName As String)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policyProvider
- ICorsPolicyProvider
可以获取 的策略 CorsPolicy提供程序。
- policyName
- String
要提取的策略的可选名称。
- 属性
适用于
CorsMiddleware(RequestDelegate, ICorsService, ILoggerFactory, String)
- Source:
- CorsMiddleware.cs
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, System::String ^ policyName);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, string policyName);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, string? policyName);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.Extensions.Logging.ILoggerFactory * string -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, loggerFactory As ILoggerFactory, policyName As String)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- loggerFactory
- ILoggerFactory
ILoggerFactory 的一个实例。
- policyName
- String
要提取的策略的可选名称。
适用于
CorsMiddleware(RequestDelegate, ICorsService, ICorsPolicyProvider, ILoggerFactory, String)
- Source:
- CorsMiddleware.cs
实例化一个新的 CorsMiddleware。
public:
CorsMiddleware(Microsoft::AspNetCore::Http::RequestDelegate ^ next, Microsoft::AspNetCore::Cors::Infrastructure::ICorsService ^ corsService, Microsoft::AspNetCore::Cors::Infrastructure::ICorsPolicyProvider ^ policyProvider, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, System::String ^ policyName);
public CorsMiddleware (Microsoft.AspNetCore.Http.RequestDelegate next, Microsoft.AspNetCore.Cors.Infrastructure.ICorsService corsService, Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider policyProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, string policyName);
new Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware : Microsoft.AspNetCore.Http.RequestDelegate * Microsoft.AspNetCore.Cors.Infrastructure.ICorsService * Microsoft.AspNetCore.Cors.Infrastructure.ICorsPolicyProvider * Microsoft.Extensions.Logging.ILoggerFactory * string -> Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware
Public Sub New (next As RequestDelegate, corsService As ICorsService, policyProvider As ICorsPolicyProvider, loggerFactory As ILoggerFactory, policyName As String)
参数
- next
- RequestDelegate
管道中的下一个中间件。
- corsService
- ICorsService
ICorsService 的一个实例。
- policyProvider
- ICorsPolicyProvider
可以获取 的策略 CorsPolicy提供程序。
- loggerFactory
- ILoggerFactory
ILoggerFactory 的一个实例。
- policyName
- String
要提取的策略的可选名称。