public ExpendituresDataService( ILocalDatabase localDatabase, IRestConnection restConnection, IExpendituresCache expendituresCache) { _localDatabase = localDatabase; _restConnection = restConnection; _cache = expendituresCache; }
public WelcomeViewModel( INavigationService navigationService, IExpendituresCache expendituresCache, ISettingsRepo settingsRepo) { _navigationService = navigationService; _expendituresCache = expendituresCache; _settingsRepo = settingsRepo; _expendituresCache.ElementAdded.Subscribe(_ => UpdateSummariesFromCache()); _settingsRepo.SettingsUpdated.Subscribe(_ => UpdateSummariesFromCache()); MoneySpentCommnand = new Command(MoneySpent); }
public StatementViewModel(IExpendituresCache expendituresCache) { StatementElements = new ObservableCollection <Expenditure>(); expendituresCache.ElementAdded.Subscribe(Insert); }