If parentDirectory is or contains a valid workspace, gets a string uniquely identifying that workspace.
[Visual Basic .NET] Public Function GetWorkspaceString ( _ ByVal parentDirectory As String, _ ByVal fileNames As IFileNames _ ) As String
[C#] public string GetWorkspaceString ( string parentDirectory, IFileNames fileNames );
[C++]
HRESULT GetWorkspaceString(
BSTR parentDirectory,
IFileNames* fileNames,
BSTR* wksString
);
[C++]Parameters
parentDirectory [in] parentDirectory is a parameter of type BSTR fileNames [in]fileNames is a parameter of type IFileNames
wksString [out, retval] wksString is a parameter of type BSTR
Product Availability
Description
If (1) the fileNames parameter is not null and ContainsWorkspace is true for this parentDirectory and list of fileNames, or (2) fileNames is null and IsWorkspace returns true for this parentDirectory, this method returns a string which represents this workspace and succeeds with S_OK as the HRESULT. Otherwise it returns null and succeeds with S_FALSE as the HRESULT. In the case where the fileNames parameter is not null, you must remove any files from the array that belong to your data source.
Note that for database data sources, parentDirectory will be the database or connection file when fileNames is null.
Remarks
This string can be passed to OpenWorkspace to open the workspace helper class for this workspace. For file- and folder-based data sources, the parentDirectory is considered the workspace. For database data sources, the first database in the list is considered the workspace. Files claimed by this data source (including .xml metadata files) must be removed from fileNames. (Note that database data sources should only remove the first database.) This function will be called repeatedly until it fails.
The content of the workspace strings is determined solely by the plug-in. Workspace strings are obtained from GetWorkspaceString and passed to IsWorkspace and OpenWorkspace. They are used as a lightweight representation of a workspace. For many data sources, the path to the workspace will be a good workspace string, but the strings can be anything. However, workspace strings containing reserved characters such as '=' should be enclosed by parentheses so that parsing will be safe.