protected void AskAuthenticationDetails() { string username = null; string token = null; while (string.IsNullOrWhiteSpace(username)) { Console.Write("username: "******"token: "); token = Console.ReadLine()?.Trim(); } var settings = _settingsStorage.Get(); settings.GithubAuth = new GithubAuth { Username = username, Token = token }; _settingsStorage.Set(settings); }
void IPersistable.Save(SettingsStorage storage) { storage .Set(nameof(AutoStart), AutoStart) .Set(nameof(Language), Language) .Set(nameof(Online), Online); }