共用方式為


AuthorizationPolicyBuilder.AddRequirements 方法

定義

將指定的 requirementsRequirements 加入至這個實例的 。

public:
 Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ AddRequirements(... cli::array <Microsoft::AspNetCore::Authorization::IAuthorizationRequirement ^> ^ requirements);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder AddRequirements (params Microsoft.AspNetCore.Authorization.IAuthorizationRequirement[] requirements);
member this.AddRequirements : Microsoft.AspNetCore.Authorization.IAuthorizationRequirement[] -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function AddRequirements (ParamArray requirements As IAuthorizationRequirement()) As AuthorizationPolicyBuilder

參數

requirements
IAuthorizationRequirement[]

要新增的授權需求。

傳回

完成作業之後,這個執行個體的參考。

適用於