예제 #1
0
             public static IWorkspaceManager WithEmptyInitializer(IWorkspacesStorageService workspacesStorageService = null)
             {
                 if (workspacesStorageService == null)
                 {
                     workspacesStorageService = Mock.Of<IWorkspacesStorageService>();
                 }

                 return new WorkspaceManagement.WorkspaceManager(new EmptyWorkspaceInitializer(), workspacesStorageService);
             }
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkspaceManager"/> class.
        /// </summary>
        /// <param name="workspaceInitializer">The workspace initializer.</param>
        /// <param name="workspacesStorageService">The for saving and loading workspaces</param>
        public WorkspaceManager(IWorkspaceInitializer workspaceInitializer, IWorkspacesStorageService workspacesStorageService)
        {
            Argument.IsNotNull(() => workspaceInitializer);

            _workspaceInitializer = workspaceInitializer;
            _workspacesStorageService = workspacesStorageService;

            BaseDirectory = Path.Combine(Path.GetApplicationDataDirectory(), "workspaces");
        }