public ReadLaterListViewModel() { readLaterManager = ServiceLocator.Current.GetInstance<IReadLaterManager>(); dataLoader = ServiceLocator.Current.GetInstance<IDataLoader>(); settings = ConfigurationSerializer.Load(); recommendations = new ObservableCollection<RecommendationViewModel>(); }
public static void Save(Settings instance) { using (var streamWriter = new StreamWriter(Path.Combine(GetRootDirectory(), configFilename))) { var serializer = new XmlSerializer(typeof(Settings)); serializer.Serialize(streamWriter, instance); } }
protected override void OnActivate() { base.OnActivate(); settings = ConfigurationSerializer.Load(); Username = settings.Username; LoadRecommendations(); }