SecurityTokenSerializer.WriteToken(XmlWriter, SecurityToken) 方法

定义

使用指定的 XML 编写器编写指定的安全令牌。

public:
 void WriteToken(System::Xml::XmlWriter ^ writer, System::IdentityModel::Tokens::SecurityToken ^ token);
public void WriteToken (System.Xml.XmlWriter writer, System.IdentityModel.Tokens.SecurityToken token);
member this.WriteToken : System.Xml.XmlWriter * System.IdentityModel.Tokens.SecurityToken -> unit
Public Sub WriteToken (writer As XmlWriter, token As SecurityToken)

参数

writer
XmlWriter

编写安全令牌的 XmlWriter

token
SecurityToken

表示要编写的安全令牌的 SecurityToken

例外

tokennull

writernull

注解

SecurityTokenSerializer 类派生的类必须重写 WriteTokenCore(XmlWriter, SecurityToken) 方法。 WriteToken(XmlWriter, SecurityToken) 方法调用 WriteTokenCore(XmlWriter, SecurityToken) 方法。

适用于