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>
授权期间要评估的处理程序。
返回
完成操作后对此实例的引用。