Exemplo n.º 1
0
        public SettingsSingleton(
            IFileSystem fileSystem,
            IGuiSettingsPath guiPaths,
            IGuiSettingsImporter guiSettingsImporter,
            IPipelineSettingsImporter pipelineSettingsImporter,
            IPipelineSettingsPath paths)
        {
            ISynthesisGuiSettings?guiSettings  = null;
            IPipelineSettings?    pipeSettings = null;

            Task.WhenAll(
                Task.Run(async() =>
            {
                if (fileSystem.File.Exists(guiPaths.Path))
                {
                    guiSettings = guiSettingsImporter.Import(guiPaths.Path);
                }
            }),
                Task.Run(async() =>
            {
                if (fileSystem.File.Exists(paths.Path))
                {
                    pipeSettings = pipelineSettingsImporter.Import(paths.Path);
                }
            })
                ).Wait();
            Gui      = guiSettings ?? new SynthesisGuiSettings();
            Pipeline = pipeSettings ?? new PipelineSettings();
        }
Exemplo n.º 2
0
 public void ReturnsDefaultGuiIfMissing(
     [Frozen] IGuiSettingsPath guiPaths,
     [Frozen] IGuiSettingsImporter settingsImporter,
     FilePath missingPath,
     ISynthesisGuiSettings settings,
     Func <SettingsSingleton> sut)
 {
     settingsImporter.Import(default).ReturnsForAnyArgs(settings);
Exemplo n.º 3
0
 public ProfileExporter(
     INavigateTo navigate,
     IRetrieveSaveSettings retrieveSaveSettings,
     IPipelineSettingsPath pipelinePaths,
     IGuiSettingsPath guiPaths)
 {
     Navigate             = navigate;
     RetrieveSaveSettings = retrieveSaveSettings;
     PipelinePaths        = pipelinePaths;
     GuiPaths             = guiPaths;
 }
Exemplo n.º 4
0
 public BackupSettings(
     IFileSystem fileSystem,
     IInitRepository initRepository,
     IProvideRepositoryCheckouts repositoryCheckouts,
     IGuiSettingsPath guiPaths,
     IPipelineSettingsPath paths)
 {
     _fileSystem          = fileSystem;
     _initRepository      = initRepository;
     _repositoryCheckouts = repositoryCheckouts;
     _guiPaths            = guiPaths;
     _paths = paths;
 }
Exemplo n.º 5
0
 public Shutdown(
     ILifetimeScope scope,
     ILogger logger,
     IStartupTracker init,
     IPipelineSettingsPath paths,
     IGuiSettingsPath guiPaths,
     IRetrieveSaveSettings save,
     IGuiSettingsExporter guiSettingsExporter,
     IPipelineSettingsExporter pipelineSettingsExporter,
     ShutDownBuildServer shutDownBuildServer,
     IMainWindow window)
 {
     _scope  = scope;
     _logger = logger;
     _init   = init;
     _pipelineSettingsPath = paths;
     _guiPaths             = guiPaths;
     _save = save;
     _guiSettingsExporter      = guiSettingsExporter;
     _pipelineSettingsExporter = pipelineSettingsExporter;
     _shutDownBuildServer      = shutDownBuildServer;
     _window = window;
 }