Class AttributeValue
Represents a SAML attribute value.
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(IEnumerable<XmlNode>)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(IEnumerable<XmlNode> data)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XmlNode> | data | The attribute value data. |
AttributeValue(IEnumerable<XmlNode>, string)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(IEnumerable<XmlNode> data, string type)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XmlNode> | data | The attribute value data. |
string | type | The attribute value type. |
AttributeValue(IEnumerable<XmlNode>, string, IDictionary<string, string>)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(IEnumerable<XmlNode> data, string type, IDictionary<string, string> xmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<XmlNode> | data | The attribute value data. |
string | type | The attribute value type. |
IDictionary<string, string> | xmlAttributes | The associated XML attributes keyed by named and containing the XML attribute values. |
AttributeValue(string)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(string data)
Parameters
Type | Name | Description |
---|---|---|
string | data | The attribute value data. |
AttributeValue(string, string)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(string data, string type)
Parameters
Type | Name | Description |
---|---|---|
string | data | The attribute value data. |
string | type | The attribute value type. |
AttributeValue(string, string, IDictionary<string, string>)
Initializes a new instance of the AttributeValue
class.
Declaration
public AttributeValue(string data, string type, IDictionary<string, string> xmlAttributes)
Parameters
Type | Name | Description |
---|---|---|
string | data | The attribute value data. |
string | type | The attribute value type. |
IDictionary<string, string> | xmlAttributes | The associated XML attributes keyed by named and containing the XML attribute values. |
AttributeValue(XmlElement)
Initializes a new instance of the AttributeValue
class from XML.
Declaration
public AttributeValue(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
XmlElement | xmlElement | The attribute value XML. |
Exceptions
Type | Condition |
---|---|
SamlSerializationException | Thrown when the XML deserialization fails. |
Properties
Data
Gets or sets the attribute value data.
Declaration
public IEnumerable<XmlNode> Data { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<XmlNode> | 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
XmlAttributes
Gets or sets the associated 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 associated 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 |
|
ToString()
Returns the attribute value data as a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The attribute value data as a string. |
Overrides
ToXml(XmlDocument)
Serializes the attribute value to XML.
Declaration
public XmlElement ToXml(XmlDocument xmlDocument)
Parameters
Type | Name | Description |
---|---|---|
XmlDocument | xmlDocument | The owning XML document. |
Returns
Type | Description |
---|---|
XmlElement | The attribute value as XML. |
Exceptions
Type | Condition |
---|---|
SamlSerializationException | Thrown when the XML serialization fails. |