Can I create a Workspace
without using IWorkspaceFactory.Create
I am trying to create a Workspace
without specifying it's parent directory, is that possible ?
Use a ScratchWorkspace. They are basically temporary local GeoDatabases that have full (single-user) GDB functionality. To create them, you don't need to specify anything. After you release the last reference, they get deleted.
I am not sure if it is possible not to use the .Create method, but i can giveyou an advice:
try to use the InMemoryWorkSpaceFactory:
/// <summary>
/// Creates a workspace that resides in memory
/// </summary>
/// <returns>A feature workspace</returns>
public static IFeatureWorkspace GetFeatureWorkspace()
{
InMemoryWorkspaceFactory workspaceFactory = new InMemoryWorkspaceFactoryClass();
IWorkspaceName workspaceName = workspaceFactory.Create(string.Empty, "Workspace", null, 0);
IName name = (IName)workspaceName;
IWorkspace inmemWor = (IWorkspace)name.Open();
return (IFeatureWorkspace)inmemWor;
}
This kind of workspace does not require a path; but a withdraw is that has limited functionality in version 10 i.e: I was not able to update features created by a locator, in other hand in version 9.x it was possible.