SamlSecurityTokenHandler.WriteCondition Method (XmlWriter, SamlCondition)

.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.

Serializes the specified SamlCondition object.

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

protected virtual void WriteCondition(
	XmlWriter writer,
	SamlCondition condition
)

Parameters

writer
Type: System.Xml.XmlWriter

The XmlWriter with which to write the data.

condition
Type: System.IdentityModel.Tokens.SamlCondition

The data to write. By default, only SamlAudienceRestrictionCondition and SamlDoNotCacheCondition are supported.

Exception Condition
ArgumentNullException

condition is null.

-or-

writer is null.

SecurityTokenException

condition is not supported. . By default, only SamlAudienceRestrictionCondition and SamlDoNotCacheCondition are supported.

By default, the method invokes either the WriteAudienceRestrictionCondition or WriteDoNotCacheCondition method to serialize the condition based on the type of SamlCondition specified.

.NET Framework
Available since 4.5
Return to top
Show: