Partager via


IMAExtensible2CallImport.OpenImportConnection Method

OpenImportConnection is used to configure the import session and is called once at the beginning of import.

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

Usage

'Usage
Dim instance As IMAExtensible2CallImport
Dim configParameters As KeyedCollection(Of String, ConfigParameter)
Dim types As Schema
Dim importRunStep As OpenImportConnectionRunStep
Dim returnValue As OpenImportConnectionResults

returnValue = instance.OpenImportConnection(configParameters, types, importRunStep)

Syntax

'Declaration
Function OpenImportConnection ( _
    configParameters As KeyedCollection(Of String, ConfigParameter), _
    types As Schema, _
    importRunStep As OpenImportConnectionRunStep _
) As OpenImportConnectionResults
OpenImportConnectionResults OpenImportConnection (
    KeyedCollection<string,ConfigParameter> configParameters,
    Schema types,
    OpenImportConnectionRunStep importRunStep
)
OpenImportConnectionResults^ OpenImportConnection (
    KeyedCollection<String^, ConfigParameter^>^ configParameters, 
    Schema^ types, 
    OpenImportConnectionRunStep^ importRunStep
)
OpenImportConnectionResults OpenImportConnection (
    KeyedCollection<String,ConfigParameter> configParameters, 
    Schema types, 
    OpenImportConnectionRunStep importRunStep
)
function OpenImportConnection (
    configParameters : KeyedCollection<String,ConfigParameter>, 
    types : Schema, 
    importRunStep : OpenImportConnectionRunStep
) : OpenImportConnectionResults

Parameters

  • types
    Contains a Schema that defines the management agent’s schema.

Return Value

Returns OpenImportConnectionResults object that contains the custom data.

Remarks

Exceptions: Return values, Errors, and Exceptions

The following is an example of OpenImportConnection:

 public OpenImportConnectionResults OpenImportConnection(
                                                KeyedCollection<string, ConfigParameter> configParameters,
                                                Schema types,
                                                OpenImportConnectionRunStep importRunStep)
        {
            // Save the import operation to use in GetImportEntries()
            m_importOperation = importRunStep.ImportType;
 
            // We do not use the configParameters, which contain connection
            // details, in the sample but if one were to connect to a 
            // foreign system, they would use these parameters to do so.
 
            // Also, ImportResults.CustomData can be used for retaining necessary data
            // for performing a subsequent import. 
            // A typical case of this might be the watermark used 
            // for delta import.
            //
            return new OpenImportConnectionResults();
        }

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

IMAExtensible2CallImport Interface
IMAExtensible2CallImport Members
Microsoft.MetadirectoryServices Namespace