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(); }
public void ReturnsDefaultGuiIfMissing( [Frozen] IGuiSettingsPath guiPaths, [Frozen] IGuiSettingsImporter settingsImporter, FilePath missingPath, ISynthesisGuiSettings settings, Func <SettingsSingleton> sut) { settingsImporter.Import(default).ReturnsForAnyArgs(settings);
public ProfileExporter( INavigateTo navigate, IRetrieveSaveSettings retrieveSaveSettings, IPipelineSettingsPath pipelinePaths, IGuiSettingsPath guiPaths) { Navigate = navigate; RetrieveSaveSettings = retrieveSaveSettings; PipelinePaths = pipelinePaths; GuiPaths = guiPaths; }
public BackupSettings( IFileSystem fileSystem, IInitRepository initRepository, IProvideRepositoryCheckouts repositoryCheckouts, IGuiSettingsPath guiPaths, IPipelineSettingsPath paths) { _fileSystem = fileSystem; _initRepository = initRepository; _repositoryCheckouts = repositoryCheckouts; _guiPaths = guiPaths; _paths = paths; }
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; }