Class AttributeType
Represents the attribute type.
Inherited Members
Namespace: ComponentSpace.SAML2.Assertions
Assembly: ComponentSpace.Saml2.dll
Syntax
public class AttributeType
Remarks
Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
AttributeType()
Initializes a new instance of the AttributeType class.
Declaration
public AttributeType()
AttributeType(string, string, string)
Initializes a new instance of the AttributeType class.
Declaration
public AttributeType(string name, string nameFormat, string friendlyName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The name format. |
| string | friendlyName | The friendly name. |
See Also
AttributeType(string, string, string, string)
Initializes a new instance of the AttributeType class.
Declaration
public AttributeType(string name, string nameFormat, string friendlyName, string attributeValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The name format. |
| string | friendlyName | The friendly name. |
| string | attributeValue | The attribute value. |
See Also
AttributeType(string, string, string, string, object)
Initializes a new instance of the AttributeType class.
Declaration
public AttributeType(string name, string nameFormat, string friendlyName, string attributeType, object attributeValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The name format. |
| string | friendlyName | The friendly name. |
| string | attributeType | The attribute type. |
| object | attributeValue | The attribute value. |
See Also
AttributeType(string, string, string, string, string)
Initializes a new instance of the AttributeType class.
Declaration
public AttributeType(string name, string nameFormat, string friendlyName, string attributeType, string attributeValue)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The name format. |
| string | friendlyName | The friendly name. |
| string | attributeType | The attribute type. |
| string | attributeValue | The attribute value. |
See Also
AttributeType(XmlElement)
Initializes a new instance of the AttributeType class from XML.
Declaration
public AttributeType(XmlElement xmlElement)
Parameters
| Type | Name | Description |
|---|---|---|
| XmlElement | xmlElement | The attribute type XML. |
Exceptions
| Type | Condition |
|---|---|
| SAMLSerializationException | Thrown when the XML deserialization fails. |
Properties
FriendlyName
Gets or sets the attribute's friendly name.
Declaration
public string FriendlyName { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The attribute's friendly name. |
Name
Gets or sets the attribute's name.
Declaration
public string Name { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The attribute's name. |
NameFormat
Gets or sets the attribute's name format.
Declaration
public string NameFormat { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The attribute's name format. |
See Also
Values
Gets or sets the attribute values.
Declaration
public IList<AttributeValue> Values { get; set; }
Property Value
| Type | Description |
|---|---|
| IList<AttributeValue> | The attribute values. |
See Also
Methods
DeregisterAttributeValueSerializer(string, string)
Deregisters an attribute value serializer.
Declaration
public static void DeregisterAttributeValueSerializer(string name, string nameFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The attribute name format. |
See Also
GetAttributeValueSerializer(string, string)
Gets the attribute value serializer for the specified attribute name and name format.
Declaration
public static IAttributeValueSerializer GetAttributeValueSerializer(string name, string nameFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The attribute name format. |
Returns
| Type | Description |
|---|---|
| IAttributeValueSerializer | The attribute value serializer. |
See Also
IsAttributeValueSerializerRegistered(string, string)
Indicates whether the attribute value serializer is registered.
Declaration
public static bool IsAttributeValueSerializerRegistered(string name, string nameFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The attribute name format. |
Returns
| Type | Description |
|---|---|
| bool |
|
See Also
RegisterAttributeValueSerializer(string, string, IAttributeValueSerializer)
Registers an attribute value serializer for serializing attribute values to XML. Attribute value serializers are identified by attribute name and name format, both of which are optional.
If an attribute name and name format are specified then the serializer matches on both. If an attribute name is not specified then the serializer matches on attribute name format. If an attribute name format is not specified then the serializer matches on attribute name. If neither an attribute name nor name format are specified then the serializer matches all.
If there's no registered attribute value serializer then the default serializer is used and the attribute value is assumed to be a string.
Declaration
public static void RegisterAttributeValueSerializer(string name, string nameFormat, IAttributeValueSerializer attributeValueSerializer)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The attribute name. |
| string | nameFormat | The attribute name format. |
| IAttributeValueSerializer | attributeValueSerializer | The attribute value serializer. |
See Also
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
ToString(string)
Returns the attribute value data as a string.
Declaration
public string ToString(string separator)
Parameters
| Type | Name | Description |
|---|---|---|
| string | separator | The separator to use between attribute values. |
Returns
| Type | Description |
|---|---|
| string | The attribute value data as a string. |
ToXml(XmlElement)
Serializes the attribute type to XML.
Declaration
public void ToXml(XmlElement xmlElement)
Parameters
| Type | Name | Description |
|---|---|---|
| XmlElement | xmlElement | The owning XML element. |
Exceptions
| Type | Condition |
|---|---|
| SAMLSerializationException | Thrown when the XML serialization fails. |