共用方式為


AuthorizationOptions.GetPolicy(String) 方法

定義

傳回指定名稱的原則,如果名稱不存在,則傳回 null。

public:
 Microsoft::AspNetCore::Authorization::AuthorizationPolicy ^ GetPolicy(System::String ^ name);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicy GetPolicy (string name);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicy? GetPolicy (string name);
member this.GetPolicy : string -> Microsoft.AspNetCore.Authorization.AuthorizationPolicy
Public Function GetPolicy (name As String) As AuthorizationPolicy

參數

name
String

要傳回的原則名稱。

傳回

指定名稱的原則,如果名稱不存在,則為 null。

適用於