public ExpenditureAppInputViewModel(Action <string, string> messageForUser, Func <string, string, bool> decisionForUser, IProvideExpenditureDataRecorder recorderFactory, IProvideExpenditureDataProvider dataProviderFactory) { recorder = recorderFactory.GetExpenditureDataRecorder(); dataProvider = dataProviderFactory.GetExpenditureDataProvider(); allDominantTags = new ObservableCollection <string>(dataProvider.GetDominantTags()); allAssociatedTags = new ObservableCollection <string>(dataProvider.GetAssociatedTags()); allPeople = new ObservableCollection <string>(dataProvider.GetPeople()); this.messageForUser = messageForUser; this.decisionForUser = decisionForUser; }
public ExpenditureDataProviderFactory(Func <string> getXmlFilePath, Action <string, string> messageForUser) { SettingsManager.CheckForXmlFileDirectory(getXmlFilePath, messageForUser); recorder = new ExtractExpenditureDataXml(DataStorage.Default.xmlFileDirectory); }
public PieChartViewModel(IProvideExpenditureDataProvider provider) { dataProvider = provider.GetExpenditureDataProvider(); PopulatePieData(); totalData = totalData.OrderByDescending((s) => s.Value).ToDictionary(pair => pair.Key, pair => pair.Value); }