ClaimsPrincipal.AddIdentity(ClaimsIdentity) 方法

定义

将指定的声明标识添加到此声明主体。

public:
 virtual void AddIdentity(System::Security::Claims::ClaimsIdentity ^ identity);
[System.Security.SecurityCritical]
public virtual void AddIdentity (System.Security.Claims.ClaimsIdentity identity);
public virtual void AddIdentity (System.Security.Claims.ClaimsIdentity identity);
[<System.Security.SecurityCritical>]
abstract member AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
override this.AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
abstract member AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
override this.AddIdentity : System.Security.Claims.ClaimsIdentity -> unit
Public Overridable Sub AddIdentity (identity As ClaimsIdentity)

参数

identity
ClaimsIdentity

要添加的声明标识。

属性

例外

identitynull

注解

标识将添加到集合中 Identities

适用于