Initiates the process of creating a connector of the specified object type from an array of object classes. If you have a ValueCollection object from the connector space entry, use the StartNewConnector method.
Namespace: Microsoft.MetadirectoryServices
Assembly: Microsoft.MetadirectoryServicesEx (in microsoft.metadirectoryservicesex.dll)

Usage

Visual Basic
Dim instance As ConnectorCollection
Dim objectType As String
Dim objectClass As String()
Dim returnValue As CSEntry

returnValue = instance.StartNewConnector(objectType, objectClass)

Syntax

Visual Basic
Public MustOverride Function StartNewConnector ( _
		objectType As String, _
		objectClass As String() _
) As CSEntry
C#
public abstract CSEntry StartNewConnector (
		string objectType,
		string[] objectClass
)
C++
public:
virtual CSEntry^ StartNewConnector (
		String^ objectType, 
		array<String^>^ objectClass
) abstract
J#
public abstract CSEntry StartNewConnector (
		String objectType, 
		String[] objectClass
)
JScript
public abstract function StartNewConnector (
		objectType : String, 
		objectClass : String[]
) : CSEntry

Parameters

objectType

Contains the name of the object type for the new connector. You must set this parameter to an object type that you have selected for the management agent. To see the object types that you selected for a management agent, open Select Object Types in the properties for the management agent.

objectClass

Contains an array of names that are used to populate the Lightweight Directory Access Protocol (LDAP) objectClass attribute on the new object. These names constitute the hierarchy of the object in Active Directory Domain Services (AD DS).

Return Value

Returns a CSEntry object (without a distinguished name) that represents the new connector.

Exceptions

Exception type Condition
System.ArgumentNullException

The objectType attribute or the objectClass attribute is null.

System.InvalidOperationException

The connector collection is read-only.

NoSuchClassException

Any element of the input object class is not in the schema.

NoSuchObjectTypeException

The object type reference is not in the schema.

Remarks

After calling this method, set the required attribute values, and then call the CommitNewConnector method to add the connector to the ConnectorCollection object. If you do not call the CommitNewConnector method after you call this method, the object is rolled back to the original attribute values without generating any error messages.

Because different management agents require different (relative) distinguished name (DN) formats, this method handles distinguished names based on the type of management agent. The types are: database management agents, XML without LDAP-style distinguished names, and the management agents that are neither database nor XML.

Management agent type Distinguished name handling notes

Database

  • The DN property is writable between the calls to the StartNewConnector method and the CommitNewConnector method, and the process may set it.

  • If the DN property is set, the DN is considered a temporary DN.

  • If the DN property is not set, a DN is constructed from the anchor attributes. You must add all attributes that contribute to the anchor to the CSEntry object before the call to the CommitNewConnector method. If any of those attributes are not set, an AttributeNotPresentException exception is thrown. The values of the anchor attributes are combined to create the DN for the object. For more information, see EscapeDNComponent.

  • After the CommitNewConnector method is called, the DN property is read-only.

XML

  • The DN property on the new connector is marked as read-only and therefore the process cannot set it.

  • The DN is constructed from the anchor attributes, and that behavior is exactly the same as the database case.

  • The DN property remains read-only after the call to the CommitNewConnector method.

All other types

  • The DN property on the new connector is writable and must be set before the call to the CommitNewConnector method. If the DN property is not set, the CommitNewConnector method throws an System.InvalidOperationException exception.

  • The DN property can be modified after the call to the CommitNewConnector method, in which case it is treated as a rename on the object.


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

See Also