This document is archived and information here might be outdated.  Recommended version.

IWorkspaceExtensionManager Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspaceExtensionManager Interface
ArcGIS Developer Help

IWorkspaceExtensionManager Interface

Provides access to members that manage a workspace extension.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Name Description
Read-only property Extension The workspace extension at this index.
Read-only property ExtensionCount The number of workspace extensions.
Method FindExtension Finds the specified workspace extension by its globally unique id.
Method RegisterExtension Registers this workspace extension with the database making it required for successful connection to this database.
Method UnRegisterExtension UnRegisters this workspace extension making it no longer required for successful connection to this database.

Classes that implement IWorkspaceExtensionManager

Classes Description
VersionedWorkspace VersionedWorkspace Object.
Workspace Workspace Object.


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.


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;

See Also

IWorkspace Interface | IWorkspaceExtensionControl Interface

.NET Samples

Extending the replication synchronization process