Export (0) Print
Expand All

SecurityTokenSerializer.CanWriteToken Method

Determines whether this serializer can write the specified security token to XML.

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

public bool CanWriteToken(
	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
Show:
© 2015 Microsoft