ConnectorCollection Class

Represents a collection of connector objects. Each connector object is represented by a CSEntry object. The collection object is retrieved from the Connectors property.

Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in Microsoft.MetadirectoryServicesEx.dll)

Usage

'Usage
Dim instance As ConnectorCollection

Syntax

'Declaration
Public MustInherit Class ConnectorCollection
    Implements IEnumerable
public abstract class ConnectorCollection : IEnumerable
public ref class ConnectorCollection abstract : IEnumerable
public abstract class ConnectorCollection implements IEnumerable
public abstract class ConnectorCollection implements IEnumerable

Example

The following example shows how to use Microsoft Visual Basic to implement the Provision method with the ConnectorCollection class.

Public Sub Provision(ByVal mventry As MVEntry) _
    Implements IMVSynchronization.Provision

    Dim Container As String
    Dim RDN As String
    Dim DN As ReferenceValue
    Dim ma As ConnectedMA
    Dim entry As CSEntry

    ma = mventry.ConnectedMAs("Fabrikam AD MA")

    ' Create the new distinguished name.
    Container = "CN=users,DC=fabrikam,DC=com"
    RDN = "CN=" & mventry("cn").Value
    DN = ma.EscapeDNComponent(RDN).Concat(Container)

    ' Start creating the new connector.
    entry = ma.Connectors.StartNewConnector("user")

    ' Set the property to the new distinguished name.
    entry.DN = DN

    ' Finish creating the new connector.
    entry.CommitNewConnector()
End Sub

The following example shows how to use C# to implement the Provision method with the ConnectorCollection class.

void IMVSynchronization.Provision(MVEntry mventry)
{
    string Container;
    string RDN;
    ReferenceValue DN;
    CSEntry entry;
    ConnectedMA ma = mventry.ConnectedMAs["Fabrikam AD MA"];

    // Create the distinguished name.
    Container = "CN=users,DC=fabrikam,DC=com";
    RDN = "CN=" + mventry["cn"].Value;
    DN = ma.EscapeDNComponent(RDN).Concat(Container);
 
    // Start creating the new connector.
    entry = ma.Connectors.StartNewConnector("user");

    // Set the property to the new distinguished name.
    entry.DN = DN;

    // Finish creating the new connector.
    entry.CommitNewConnector();
}

Inheritance Hierarchy

System.Object
  Microsoft.MetadirectoryServices.ConnectorCollection

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

Change History

See Also

Reference

ConnectorCollection Members
Microsoft.MetadirectoryServices Namespace
ConnectorCollectionByDN
ConnectorCollectionByIndex
ConnectorCollectionEnumerator
CSEntry
Provision
ReferenceValue
Microsoft.MetadirectoryServices