SecurityTokenHandler.CanReadKeyIdentifierClause Method (XmlReader)

.NET Framework (current version)
 
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.

Returns a value that indicates whether the XML element referred to by the specified XML reader is a key identifier clause that can be deserialized by this instance.

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

public virtual bool CanReadKeyIdentifierClause(
	XmlReader reader
)

Parameters

reader
Type: System.Xml.XmlReader

An XML reader positioned at the start element. The reader should not be advanced by this method.

Return Value

Type: System.Boolean

true if the ReadKeyIdentifierClause method can read the element; otherwise, false. The default is false.

The default implementation returns false to indicate that the key identifier clause cannot be read.

A derived class checks the element that the reader is referring to in order to determine whether the instance can deserialize a key identifier clause. This is typically accomplished through a call to the XmlReader.IsStartElement method with the appropriate element and namespace strings specified. If you override CanReadKeyIdentifierClause, you must also override the ReadKeyIdentifierClause method to provide the logic to deserialize the key identifier clause.

.NET Framework
Available since 4.5
Return to top
Show: