共用方式為


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) 方法。

適用於