Exemplo n.º 1
0
 void LoadAvailableUsers()
 {
     try
     {
         fileHandler.DeserializeFromFile <List <GitUser> >(GetUsersFilePath()).ForEach(u => availableUsers.Add(u));
         hasLoadedUsers = true;
     }
     catch (FileNotFoundException)
     {
         // Could not load file -- proceed with an empty users list
     }
 }
Exemplo n.º 2
0
 void LoadFromFile()
 {
     try
     {
         currentOptions = fileHandler.DeserializeFromFile <GitSwitchOptions>(AppConstants.OptionsFile);
     }
     catch (FileNotFoundException)
     {
         currentOptions = new GitSwitchOptions
         {
             KillSshAgent = false,
             UsersFile    = AppConstants.UsersFile
         };
     }
 }