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。

适用于