public WorkspacesManagerService(
     IInvestigationFactory investigationFactory,
     IInvestigationInfoLoader investigationInfoLoader,
     IWorkspaceFactory workspaceFactory,
     ILogger logger) : base()
 {
     this.InvestigationFactory    = investigationFactory;
     this.InvestigationInfoLoader = investigationInfoLoader;
     this.WorkspaceFactory        = workspaceFactory;
     this.Logger = logger;
     this.LoadWorkspacesFromSettingsFile();
 }
Пример #2
0
        public Workspace(IInvestigationFactory investigationFactory, IInvestigationInfoLoader investigationInfoLoader, string workspaceName, string workspacesStoragePath, string connectionString)
        {
            this.InvestigationFactory    = investigationFactory;
            this.InvestigationInfoLoader = investigationInfoLoader;
            this.Name                   = workspaceName;
            this.ConnectionString       = connectionString;
            this.WorkspaceDirectoryInfo = GetWorkspaceDirectoryInfo(this.Name, workspacesStoragePath);
            if (this.WorkspaceDirectoryInfo.Exists)
            {
                throw new InvalidOperationException("InvestigationWorkspace already exists!");
            }
            this.WorkspaceDirectoryInfo.Create();
            this.Guid             = Guid.NewGuid();
            this.Created          = DateTime.Now;
            this.LastRecentlyUsed = this.Created;

            this.InvestigationsDirectoryInfo.Create();
        }