Show / Hide Table of Contents

Class AttributeValue

Represents a SAML attribute value.

Inheritance
object
AttributeValue
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: ComponentSpace.SAML2.Assertions
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AttributeValue
Remarks

Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.

Constructors

AttributeValue()

Initializes a new instance of the AttributeValue class.

Declaration
public AttributeValue()

AttributeValue(IDictionary<string, string>, string, object)

Initializes a new instance of the AttributeValue class.

Declaration
public AttributeValue(IDictionary<string, string> xmlAttributes, string type, object data)
Parameters
Type Name Description
IDictionary<string, string> xmlAttributes

The XML attributes keyed by named and containing the XML attribute values.

string type

The attribute value type.

object data

The attribute value data.

AttributeValue(object)

Initializes a new instance of the AttributeValue class.

Declaration
public AttributeValue(object data)
Parameters
Type Name Description
object data

The attribute value data.

AttributeValue(string, object)

Initializes a new instance of the AttributeValue class.

Declaration
public AttributeValue(string type, object data)
Parameters
Type Name Description
string type

The attribute value type.

object data

The attribute value data.

AttributeValue(XmlElement, IAttributeValueSerializer)

Initializes a new instance of the AttributeValue class from XML.

Declaration
public AttributeValue(XmlElement xmlElement, IAttributeValueSerializer attributeValueSerializer)
Parameters
Type Name Description
XmlElement xmlElement

The attribute value XML.

IAttributeValueSerializer attributeValueSerializer

The attribute value serializer.

Exceptions
Type Condition
SAMLSerializationException

Thrown when the XML deserialization fails.

See Also
RegisterAttributeValueSerializer(string, string, IAttributeValueSerializer)
StringAttributeValueSerializer
XmlAttributeValueSerializer

Properties

Data

Gets or sets the attribute value data.

Declaration
public object Data { get; set; }
Property Value
Type Description
object

The attribute value data.

Type

Gets or sets the attribute value type.

Declaration
public string Type { get; set; }
Property Value
Type Description
string

The attribute value type.

See Also
XmlSchema.SimpleTypes

XmlAttributes

Gets or sets the XML attributes keyed by named and containing the XML attribute values.

Declaration
public IDictionary<string, string> XmlAttributes { get; set; }
Property Value
Type Description
IDictionary<string, string>

The XML attributes keyed by named and containing the XML attribute values.

Methods

IsValid(XmlElement)

Indicates whether the XML is an attribute value.

Declaration
public static bool IsValid(XmlElement xmlElement)
Parameters
Type Name Description
XmlElement xmlElement

The XML to test.

Returns
Type Description
bool

true if the XML is an attribute value; otherwise false.

ToString()

Returns the attribute value.

Declaration
public override string ToString()
Returns
Type Description
string

The attribute value

Overrides
object.ToString()

ToXml(XmlDocument, IAttributeValueSerializer)

Serializes the attribute value to XML.

Declaration
public XmlElement ToXml(XmlDocument xmlDocument, IAttributeValueSerializer attributeValueSerializer)
Parameters
Type Name Description
XmlDocument xmlDocument

The owning XML document.

IAttributeValueSerializer attributeValueSerializer

The attribute value serializer.

Returns
Type Description
XmlElement

The attribute value as XML.

Exceptions
Type Condition
SAMLSerializationException

Thrown when the XML serialization fails.

See Also
RegisterAttributeValueSerializer(string, string, IAttributeValueSerializer)
StringAttributeValueSerializer
XmlAttributeValueSerializer
In this article
Back to top Copyright © ComponentSpace Pty Ltd 2004-2025. All rights reserved.