Dock
This commit is contained in:
parent
b1d3ec73c9
commit
693d12b61c
35 changed files with 389 additions and 269 deletions
|
|
@ -46,7 +46,7 @@ public class WorkspaceManager(IServiceProvider serviceProvider) : ReactiveObject
|
|||
|
||||
file.Directory!.Create();
|
||||
IServiceScope? scope = null;
|
||||
IWorkspaceAccessor workspaceAccessor;
|
||||
IWorkspaceContext workspaceContext;
|
||||
try
|
||||
{
|
||||
scope = _serviceProvider.CreateScope();
|
||||
|
|
@ -54,8 +54,8 @@ public class WorkspaceManager(IServiceProvider serviceProvider) : ReactiveObject
|
|||
var options = serviceProvider.GetRequiredService<LocalWorkspaceOptions>();
|
||||
options.DbPath = path;
|
||||
|
||||
workspaceAccessor = serviceProvider.GetRequiredService<IWorkspaceAccessor>();
|
||||
workspaceAccessor.Workspace = new Workspace(scope)
|
||||
workspaceContext = serviceProvider.GetRequiredService<IWorkspaceContext>();
|
||||
workspaceContext.Workspace = new Workspace(scope)
|
||||
{
|
||||
Name = Path.GetFileNameWithoutExtension(file.Name),
|
||||
Options = options,
|
||||
|
|
@ -87,6 +87,6 @@ public class WorkspaceManager(IServiceProvider serviceProvider) : ReactiveObject
|
|||
scope?.Dispose();
|
||||
}
|
||||
|
||||
return workspaceAccessor.Workspace;
|
||||
return workspaceContext.Workspace;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue