private static WACPreference CreateNewPreference(string preferenceName) { WACPreference newPreference = new WACPreference() { PreferenceName = preferenceName }; newPreference.AudioPlaylists.Add(new WACPlaylist() { PlaylistName = "First Audio Playlist" }); newPreference.CurrentAudioPlaylist = newPreference.AudioPlaylists.First().PlaylistName; newPreference.PlaybackPlaylists.Add(new WACPlaylist() { PlaylistName = "First Playback Playlist" }); newPreference.CurrentPlaybackPlaylist = newPreference.PlaybackPlaylists.First().PlaylistName; return(newPreference); }
private void DeleteProfile(WACPreference profile) { preferences.Remove(profile); File.Delete(Path.Combine(preferencesFolder, $"{profile.PreferenceName}.json")); }