Interface IWorkspaceExtensionManager

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to members that manage a workspace extension.

[Guid("B2119283-0CD1-11D4-9FAC-00C04F6BDF0C")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IWorkspaceExtensionManager

Remarks

IWorkspaceExtensionManager is an optional interface supported by Personal, File and ArcSDE geodatabase workspaces. The FindExtension method returns a reference to a workspace extension given its GUID. An application can also discover and iterate over all extensions using the ExtensionCount and Extension properties.

[C#]

The following code demonstrates how to get a reference to the IWorkspaceExtensionManager in order to access the IDatasetContainer2.  The end result of which could be to create a network dataset or find a pre-existing network dataset.  The code assumes you have a reference to the workspace (workspace) in which the network dataset will be created or exists.  The workspace could also correspond to the folder containing a shapefile network dataset or SDC data.

public void esriGeoDatabase__IWorkspaceExtensionManager(IWorkspace workspace) {    // Cast to the IWorkspaceExtensionManager interface    IWorkspaceExtensionManager workspaceextensionManager = (IWorkspaceExtensionManager)workspace;                // Set the UID value for the workspace extention which we want to use    UID uid = new UID();    uid.Value = "esriGeoDatabase.NetworkDatasetWorkspaceExtension";                // Get the DatasetContainer for the workspace extension    IWorkspaceExtension workspaceExtension = workspaceextensionManager.FindExtension(uid);    IDatasetContainer2 datasetContainer2 = (IDatasetContainer2)workspaceExtension;    Console.WriteLine(datasetContainer2.get_DatasetCount(esriDatasetType.esriDTNetworkDataset)); }

Properties

Extension[int]

The workspace extension at this index.

IWorkspaceExtension Extension[int Index] { get; }

Parameters

Index int

Property Value

IWorkspaceExtension

ExtensionCount

The number of workspace extensions.

int ExtensionCount { get; }

Property Value

int

Methods

FindExtension(UID)

Finds the specified workspace extension by its globally unique id.

IWorkspaceExtension FindExtension(UID GUID)

Parameters

GUID UID

Returns

IWorkspaceExtension

RegisterExtension(string, UID)

Registers this workspace extension with the database making it required for successful connection to this database.

void RegisterExtension(string Name, UID GUID)

Parameters

Name string
GUID UID

UnRegisterExtension(UID)

UnRegisters this workspace extension making it no longer required for successful connection to this database.

void UnRegisterExtension(UID GUID)

Parameters

GUID UID