Class DistinguishedName
This class helps with processing a DistinguishedName See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366101.aspx
Inheritance
Implements
Inherited Members
Namespace: Dapplo.ActiveDirectory.Entities
Assembly: Dapplo.ActiveDirectory.dll
Syntax
public class DistinguishedName : IEnumerable<KeyValuePair<DistinguishedNameAttributes, string>>, IEnumerable
Properties
| Improve this Doc View SourceRelativeDistinguishedNames
List of the distinguished names, this is just the collection of all available dn's
Declaration
public IEnumerable<KeyValuePair<DistinguishedNameAttributes, string>> RelativeDistinguishedNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<DistinguishedNameAttributes, System.String>> |
Methods
| Improve this Doc View SourceAdd(DistinguishedNameAttributes, String)
Add whatever the DistinguishedNameAttributes has
Declaration
public DistinguishedName Add(DistinguishedNameAttributes distinguishedNameAttribute, string value)
Parameters
Type | Name | Description |
---|---|---|
DistinguishedNameAttributes | distinguishedNameAttribute | DistinguishedNameAttributes |
System.String | value |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
Add(String)
Add a "relative" distinguishedName, meaning it will parse a value like "DC=something" and add it
Declaration
public DistinguishedName Add(string relativeDistinguishedName)
Parameters
Type | Name | Description |
---|---|---|
System.String | relativeDistinguishedName |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
Cn(String)
Add a CN
Declaration
public DistinguishedName Cn(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
Create()
Create a DistinguishedName, as the default constructor is private
Declaration
public static DistinguishedName Create()
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
CreateFrom(String)
Create a DistinguishedName from a string representation
Declaration
public static DistinguishedName CreateFrom(string distinguishedName)
Parameters
Type | Name | Description |
---|---|---|
System.String | distinguishedName |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
Dc(String)
Add a DC
Declaration
public DistinguishedName Dc(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
GetEnumerator()
Enumerator for the destinguished names
Declaration
public IEnumerator<KeyValuePair<DistinguishedNameAttributes, string>> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<DistinguishedNameAttributes, System.String>> | IEnumerator |
Ou(String)
Add a OU
Declaration
public DistinguishedName Ou(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value |
Returns
Type | Description |
---|---|
DistinguishedName | DistinguishedName |
ToString()
Create a string representation of the DistinguishedName
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
Operators
| Improve this Doc View SourceImplicit(DistinguishedName to String)
Add implicit casting to string
Declaration
public static implicit operator string (DistinguishedName value)
Parameters
Type | Name | Description |
---|---|---|
DistinguishedName | value | string |
Returns
Type | Description |
---|---|
System.String |
Implicit(String to DistinguishedName)
Add implicit casting from string
Declaration
public static implicit operator DistinguishedName(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | string |
Returns
Type | Description |
---|---|
DistinguishedName |
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
IEnumerable implementation
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | IEnumerator |