Class AttributeValue
- Namespace
- ComponentSpace.Saml2.Assertions
- Assembly
- ComponentSpace.Saml2.dll
Represents a SAML attribute value.
public class AttributeValue
- Inheritance
-
AttributeValue
- Inherited Members
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.
public AttributeValue()
AttributeValue(IEnumerable<XmlNode>)
Initializes a new instance of the AttributeValue class.
public AttributeValue(IEnumerable<XmlNode> data)
Parameters
dataIEnumerable<XmlNode>The attribute value data.
AttributeValue(IEnumerable<XmlNode>, string)
Initializes a new instance of the AttributeValue class.
public AttributeValue(IEnumerable<XmlNode> data, string type)
Parameters
dataIEnumerable<XmlNode>The attribute value data.
typestringThe attribute value type.
AttributeValue(IEnumerable<XmlNode>, string, IDictionary<string, string>)
Initializes a new instance of the AttributeValue class.
public AttributeValue(IEnumerable<XmlNode> data, string type, IDictionary<string, string> xmlAttributes)
Parameters
dataIEnumerable<XmlNode>The attribute value data.
typestringThe attribute value type.
xmlAttributesIDictionary<string, string>The associated XML attributes keyed by named and containing the XML attribute values.
AttributeValue(string)
Initializes a new instance of the AttributeValue class.
public AttributeValue(string data)
Parameters
datastringThe attribute value data.
AttributeValue(string, string)
Initializes a new instance of the AttributeValue class.
public AttributeValue(string data, string type)
Parameters
AttributeValue(string, string, IDictionary<string, string>)
Initializes a new instance of the AttributeValue class.
public AttributeValue(string data, string type, IDictionary<string, string> xmlAttributes)
Parameters
datastringThe attribute value data.
typestringThe attribute value type.
xmlAttributesIDictionary<string, string>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.
public AttributeValue(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe attribute value XML.
Exceptions
- SamlSerializationException
Thrown when the XML deserialization fails.
Properties
Data
Gets or sets the attribute value data.
public IEnumerable<XmlNode> Data { get; set; }
Property Value
- IEnumerable<XmlNode>
The attribute value data.
Type
Gets or sets the attribute value type.
public string Type { get; set; }
Property Value
- string
The attribute value type.
- See Also
-
XmlSchema.SimpleTypes
XmlAttributes
Gets or sets the associated XML attributes keyed by named and containing the XML attribute values.
public IDictionary<string, string> XmlAttributes { get; set; }
Property Value
- 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.
public static bool IsValid(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe XML to test.
Returns
- bool
trueif the XML is an attribute value; otherwisefalse.
ToString()
Returns the attribute value data as a string.
public override string ToString()
Returns
- string
The attribute value data as a string.
ToXml(XmlDocument)
Serializes the attribute value to XML.
public XmlElement ToXml(XmlDocument xmlDocument)
Parameters
xmlDocumentXmlDocumentThe owning XML document.
Returns
- XmlElement
The attribute value as XML.
Exceptions
- SamlSerializationException
Thrown when the XML serialization fails.