共用方式為


AuthorizationPolicy 建構函式

定義

建立 AuthorizationPolicy 的新執行個體。

public:
 AuthorizationPolicy(System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^> ^ requirements, System::Collections::Generic::IEnumerable<System::String ^> ^ authenticationSchemes);
public AuthorizationPolicy (System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> requirements, System.Collections.Generic.IEnumerable<string> authenticationSchemes);
new Microsoft.AspNetCore.Authorization.AuthorizationPolicy : seq<Microsoft.AspNetCore.Authorization.IAuthorizationRequirement> * seq<string> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicy
Public Sub New (requirements As IEnumerable(Of IAuthorizationRequirement), authenticationSchemes As IEnumerable(Of String))

參數

requirements
IEnumerable<IAuthorizationRequirement>

必須成功此原則才能成功之 的清單 IAuthorizationRequirement

authenticationSchemes
IEnumerable<String>

會根據 評估 的 requirements 驗證配置。

適用於