SALES: 1-800-867-1380
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SecurityTokenSerializer.CanWriteTokenCore Method

Determines whether this serializer can write the specified security token to XML. Called by the base class.

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

protected abstract bool CanWriteTokenCore(
	SecurityToken token
)

Parameters

token
Type: System.IdentityModel.Tokens.SecurityToken

The SecurityToken to convert to XML.

Return Value

Type: System.Boolean
true when the security token can be written; otherwise, false.

ExceptionCondition
ArgumentNullException

token is null.

Classes that derive from the SecurityTokenSerializer class must override the CanWriteTokenCore(SecurityToken) method. The CanWriteToken(SecurityToken) method calls the CanWriteTokenCore(SecurityToken) method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft