示例#1
0
        private void SetCurrentSettings()
        {
            FileSystemResult <PGMSetting> result = _fileSystemRepository.ReadOnFileData <PGMSetting>();

            if (result.HasSucceeded)
            {
                CurrentSettings = result.Type;
            }
        }
示例#2
0
        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);
        }