Class DirectoryData

A class that holds data for an LDAP entry.

Inheritance
System.Object
DirectoryData
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Security
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class DirectoryData

Constructors

DirectoryData(String, String, IDictionary<String, String[]>)

Initializes a new instance of the DirectoryData class.

Declaration
public DirectoryData(string distinguishedName, string schemaClassName, IDictionary<string, string[]> properties)
Parameters
Type Name Description
System.String distinguishedName

Distinguished name that is associated with this data.

System.String schemaClassName

Name of the schema class.

System.Collections.Generic.IDictionary<System.String, System.String[]> properties

The properties for this directory data.

Properties

DistinguishedName

Gets or sets the distinguished name.

Declaration
public string DistinguishedName { get; protected set; }
Property Value
Type Description
System.String

The distinguished name.

Item[String]

Gets the property values associated with the specified property name.

Declaration
public string[] this[string propertyName] { get; }
Parameters
Type Name Description
System.String propertyName
Property Value
Type Description
System.String[]

A String[] with the values for the property.

Properties

Gets or sets the properties.

Declaration
protected IDictionary<string, string[]> Properties { get; set; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.String, System.String[]>

The properties.

PropertyNames

A collection of all property names in the current instance.

Declaration
public ICollection<string> PropertyNames { get; }
Property Value
Type Description
System.Collections.Generic.ICollection<System.String>

The property names.

SchemaClassName

Gets or sets the name of the schema class.

Declaration
public string SchemaClassName { get; protected set; }
Property Value
Type Description
System.String

The name of the schema class.

Methods

GetFirstPropertyValue(String)

Gets the first property value.

Declaration
public string GetFirstPropertyValue(string propertyName)
Parameters
Type Name Description
System.String propertyName

Name of the property.

Returns
Type Description
System.String

A string with the first property value, or null if the property was not found.

Remarks

Properties can be multi-valued but many (most) properties are only single-valued. In order to simplify access to these single-valued properties use this method.

TryGetValue(String, out String[])

Tries to get values for propertyName.

Declaration
public bool TryGetValue(string propertyName, out string[] propertyValue)
Parameters
Type Name Description
System.String propertyName

Name of the property.

System.String[] propertyValue

The property values.

Returns
Type Description
System.Boolean

True if the parameter was found; False otherwise.

Extension Methods