private void SetCurrentSettings() { FileSystemResult <PGMSetting> result = _fileSystemRepository.ReadOnFileData <PGMSetting>(); if (result.HasSucceeded) { CurrentSettings = result.Type; } }
public PGMSetting InitializePgm() { FileSystemResult <PGMSetting> result = _fileSystemRepository.ReadOnFileData <PGMSetting>(); if (!result.HasSucceeded) { PGMSetting pgmSetting = InitPgmSetting(); _fileSystemRepository.WriteOnFileData(pgmSetting); result = _fileSystemRepository.ReadOnFileData <PGMSetting>(); } if (!string.IsNullOrEmpty(result.Type.GitLabApiKey)) { result.Type.PgmHasSetup = true; } return(result.Type); }