AuthorizationPolicyBuilder.RequireAssertion 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
RequireAssertion(Func<AuthorizationHandlerContext,Task<Boolean>>) |
AssertionRequirement將 加入至目前的實例。 |
RequireAssertion(Func<AuthorizationHandlerContext,Boolean>) |
AssertionRequirement將 加入至目前的實例。 |
RequireAssertion(Func<AuthorizationHandlerContext,Task<Boolean>>)
AssertionRequirement將 加入至目前的實例。
public:
Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ RequireAssertion(Func<Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^, System::Threading::Tasks::Task<bool> ^> ^ handler);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion (Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext,System.Threading.Tasks.Task<bool>> handler);
member this.RequireAssertion : Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext, System.Threading.Tasks.Task<bool>> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireAssertion (handler As Func(Of AuthorizationHandlerContext, Task(Of Boolean))) As AuthorizationPolicyBuilder
參數
- handler
- Func<AuthorizationHandlerContext,Task<Boolean>>
在授權期間評估的處理常式。
傳回
完成作業之後,這個執行個體的參考。
適用於
RequireAssertion(Func<AuthorizationHandlerContext,Boolean>)
AssertionRequirement將 加入至目前的實例。
public:
Microsoft::AspNetCore::Authorization::AuthorizationPolicyBuilder ^ RequireAssertion(Func<Microsoft::AspNetCore::Authorization::AuthorizationHandlerContext ^, bool> ^ handler);
public Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder RequireAssertion (Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext,bool> handler);
member this.RequireAssertion : Func<Microsoft.AspNetCore.Authorization.AuthorizationHandlerContext, bool> -> Microsoft.AspNetCore.Authorization.AuthorizationPolicyBuilder
Public Function RequireAssertion (handler As Func(Of AuthorizationHandlerContext, Boolean)) As AuthorizationPolicyBuilder
參數
- handler
- Func<AuthorizationHandlerContext,Boolean>
在授權期間評估的處理常式。
傳回
完成作業之後,這個執行個體的參考。