共用方式為


IAuthorizationPolicyProvider.GetPolicyAsync(String) 方法

定義

AuthorizationPolicy從指定的 取得policyName

public:
 System::Threading::Tasks::Task<Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^> ^ GetPolicyAsync(System::String ^ policyName);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationPolicy> GetPolicyAsync (string policyName);
public System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationPolicy?> GetPolicyAsync (string policyName);
abstract member GetPolicyAsync : string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authorization.AuthorizationPolicy>
Public Function GetPolicyAsync (policyName As String) As Task(Of AuthorizationPolicy)

參數

policyName
String

要擷取的原則名稱。

傳回

具名 AuthorizationPolicy 的 。

適用於