Class AttributeValue
Represents a SAML attribute value.
Inheritance
Inherited Members
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 |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.String> | xmlAttributes | The XML attributes keyed by named and containing the XML attribute values. |
System.String | type | The attribute value type. |
System.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 |
---|---|---|
System.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 |
---|---|---|
System.String | type | The attribute value type. |
System.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 |
---|---|---|
System.Xml.XmlElement | xmlElement | The attribute value XML. |
IAttributeValueSerializer | attributeValueSerializer | The attribute value serializer. |
Exceptions
Type | Condition |
---|---|
SAMLSerializationException | Thrown when the XML deserialization fails. |
See Also
Properties
Data
Gets or sets the attribute value data.
Declaration
public object Data { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The attribute value data. |
Type
Gets or sets the attribute value type.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
System.String | The attribute value type. |
See Also
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 |
---|---|
System.Collections.Generic.IDictionary<System.String, System.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 |
---|---|---|
System.Xml.XmlElement | xmlElement | The XML to test. |
Returns
Type | Description |
---|---|
System.Boolean |
|
ToString()
Returns the attribute value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The attribute value |
Overrides
ToXml(XmlDocument, IAttributeValueSerializer)
Serializes the attribute value to XML.
Declaration
public XmlElement ToXml(XmlDocument xmlDocument, IAttributeValueSerializer attributeValueSerializer)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | xmlDocument | The owning XML document. |
IAttributeValueSerializer | attributeValueSerializer | The attribute value serializer. |
Returns
Type | Description |
---|---|
System.Xml.XmlElement | The attribute value as XML. |
Exceptions
Type | Condition |
---|---|
SAMLSerializationException | Thrown when the XML serialization fails. |