SecurityTokenHandlerCollection.WriteToken 方法

定义

序列化指定安全标记。Serializes the specified security token.

重载

WriteToken(SecurityToken)

序列化指定安全标记到字符串。Serializes the specified security token to a string.

WriteToken(XmlWriter, SecurityToken)

序列化指定安全标记到 XML。Serializes the specified security token to XML.

WriteToken(SecurityToken)

序列化指定安全标记到字符串。Serializes the specified security token to a string.

public:
 System::String ^ WriteToken(System::IdentityModel::Tokens::SecurityToken ^ token);
public string WriteToken (System.IdentityModel.Tokens.SecurityToken token);
member this.WriteToken : System.IdentityModel.Tokens.SecurityToken -> string
Public Function WriteToken (token As SecurityToken) As String

参数

token
SecurityToken

要序列化的标记。The token to serialize.

返回

String

从标记的字符串序列化。The string serialized from the token.

例外

tokennulltoken is null.

集合不包含能够序列化指定标记的处理器。The collection does not contain a handler capable of serializing the specified token.

适用于

WriteToken(XmlWriter, SecurityToken)

序列化指定安全标记到 XML。Serializes the specified security token to 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

XML 编写器。The XML writer.

token
SecurityToken

要序列化的标记。The token to serialize.

例外

tokennulltoken is null.

-or- writernullwriter is null.

集合不包含能够序列化指定标记的处理器。The collection does not contain a handler capable of serializing the specified token.

适用于