AuthorizationHandlerContext.Fail 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Fail() |
调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。 |
Fail(AuthorizationFailureReason) |
调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。 |
Fail()
调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。
public:
void Fail();
public:
virtual void Fail();
public void Fail ();
public virtual void Fail ();
member this.Fail : unit -> unit
abstract member Fail : unit -> unit
override this.Fail : unit -> unit
Public Sub Fail ()
Public Overridable Sub Fail ()
适用于
Fail(AuthorizationFailureReason)
调用以指示 HasSucceeded 永远不会返回 true,即使满足所有要求。
public virtual void Fail (Microsoft.AspNetCore.Authorization.AuthorizationFailureReason reason);
abstract member Fail : Microsoft.AspNetCore.Authorization.AuthorizationFailureReason -> unit
override this.Fail : Microsoft.AspNetCore.Authorization.AuthorizationFailureReason -> unit
Public Overridable Sub Fail (reason As AuthorizationFailureReason)
参数
- reason
- AuthorizationFailureReason
授权失败原因的可选 AuthorizationFailureReason 。