C# Class Zetetic.Ldap.MutableEntry

MutableEntry is a wrapper around a basic Zetetic.Ldap.Entry with change-tracking. You can create, inspect, rename, modify, and delete a MutableEntry, and save it to an LDAP host, without dealing with the semantics of the LDAP operations.
Inheritance: Zetetic.Ldap.Entry, IDisposable
显示文件 Open project: skradel/Zetetic.Ldap Class Usage Examples

Protected Properties

Property Type Description
_changes DirectoryAttributeModification>.Dictionary

Public Methods

Method Description
AppendAttrValue ( string attrName, string value ) : void
ClearAttr ( string attrName ) : void

Replace all values of 'attrName' with the empty string.

CommitChanges ( System.DirectoryServices.Protocols.LdapConnection ldap ) : void

Send all pending changes to the directory service. If there is a pending rename / re-superior, it will fire first.

ContainsAttrValue ( string propName, object value ) : bool
CreateUncommitted ( string dn ) : MutableEntry
Delete ( System.DirectoryServices.Protocols.LdapConnection ldap ) : void
Dispose ( ) : void
GetAttrStringValue ( string propName ) : string
HasAttribute ( string attrName ) : bool
MutableEntry ( System.DirectoryServices.Protocols.SearchResultEntry se ) : System
MutableEntry ( string dn ) : System
RemoveAttrValue ( string attrName, string value ) : void

On a new/uncommitted entry, check for any in-queue Add / Replace operations on 'propName' and remove 'value' if present. On a regular existing entry, queue a deletion of the specified value.

SetAttr ( string attrName, object values ) : void

Replace the values of 'propName' with 'values'. If there is already an in-flight Replace request on 'propName', this method will add to its values.

SetAttr ( string attrName, string value ) : void

Replace the values of 'propName' with 'value'. If there is already an in-flight Replace request on 'propName', this method will add to its values.

Protected Methods

Method Description
CheckForDeletion ( ) : void
Dispose ( bool isDisposing ) : void

Private Methods

Method Description
ChangesAsDAMC ( ) : System.DirectoryServices.Protocols.DirectoryAttributeModificationCollection

Collect the set of pending modifications for sending to the LDAP DSA

Method Details

AppendAttrValue() public method

public AppendAttrValue ( string attrName, string value ) : void
attrName string
value string
return void

CheckForDeletion() protected method

protected CheckForDeletion ( ) : void
return void

ClearAttr() public method

Replace all values of 'attrName' with the empty string.
public ClearAttr ( string attrName ) : void
attrName string
return void

CommitChanges() public method

Send all pending changes to the directory service. If there is a pending rename / re-superior, it will fire first.
public CommitChanges ( System.DirectoryServices.Protocols.LdapConnection ldap ) : void
ldap System.DirectoryServices.Protocols.LdapConnection
return void

ContainsAttrValue() public method

public ContainsAttrValue ( string propName, object value ) : bool
propName string
value object
return bool

CreateUncommitted() public static method

public static CreateUncommitted ( string dn ) : MutableEntry
dn string
return MutableEntry

Delete() public method

public Delete ( System.DirectoryServices.Protocols.LdapConnection ldap ) : void
ldap System.DirectoryServices.Protocols.LdapConnection
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool isDisposing ) : void
isDisposing bool
return void

GetAttrStringValue() public method

public GetAttrStringValue ( string propName ) : string
propName string
return string

HasAttribute() public method

public HasAttribute ( string attrName ) : bool
attrName string
return bool

MutableEntry() public method

public MutableEntry ( System.DirectoryServices.Protocols.SearchResultEntry se ) : System
se System.DirectoryServices.Protocols.SearchResultEntry
return System

MutableEntry() public method

public MutableEntry ( string dn ) : System
dn string
return System

RemoveAttrValue() public method

On a new/uncommitted entry, check for any in-queue Add / Replace operations on 'propName' and remove 'value' if present. On a regular existing entry, queue a deletion of the specified value.
public RemoveAttrValue ( string attrName, string value ) : void
attrName string
value string
return void

SetAttr() public method

Replace the values of 'propName' with 'values'. If there is already an in-flight Replace request on 'propName', this method will add to its values.
public SetAttr ( string attrName, object values ) : void
attrName string
values object
return void

SetAttr() public method

Replace the values of 'propName' with 'value'. If there is already an in-flight Replace request on 'propName', this method will add to its values.
public SetAttr ( string attrName, string value ) : void
attrName string
value string
return void

Property Details

_changes protected_oe property

protected Dictionary _changes
return DirectoryAttributeModification>.Dictionary