SecurityTokenSerializer.WriteToken Method (XmlWriter, SecurityToken)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Writes the specified security token using the specified XML writer.

Namespace:   System.IdentityModel.Selectors
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public void WriteToken(
	XmlWriter writer,
	SecurityToken token
)

Parameters

writer
Type: System.Xml.XmlWriter

A XmlWriter to write the security token.

token
Type: System.IdentityModel.Tokens.SecurityToken

A SecurityToken that represents the security token to write.

Exception Condition
ArgumentNullException

token is null.

-or-

writer is null.

Classes that derive from the SecurityTokenSerializer class must override the WriteTokenCore(XmlWriter, SecurityToken) method. The WriteToken(XmlWriter, SecurityToken) method calls the WriteTokenCore(XmlWriter, SecurityToken) method.

.NET Framework
Available since 3.0
Return to top
Show: