/// <summary> /// Initializes a new instance of the <see cref="BudgetMaintenanceService" /> class. /// </summary> /// <exception cref="System.ArgumentNullException">budgetRepository</exception> public BudgetMaintenanceService( [NotNull] IBudgetRepository budgetRepository, [NotNull] IBudgetBucketRepository bucketRepo, [NotNull] ILogger logger, [NotNull] MonitorableDependencies monitorableDependencies) { if (budgetRepository == null) { throw new ArgumentNullException(nameof(budgetRepository)); } if (bucketRepo == null) { throw new ArgumentNullException(nameof(bucketRepo)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (monitorableDependencies == null) { throw new ArgumentNullException(nameof(monitorableDependencies)); } this.budgetRepository = budgetRepository; this.logger = logger; this.monitorableDependencies = monitorableDependencies; BudgetBucketRepository = bucketRepo; CreateNewBudgetCollection(); }
/// <summary> /// Initializes a new instance of the <see cref="TransactionManagerService" /> class. /// </summary> /// <param name="bucketRepository">The bucket repository.</param> /// <param name="statementRepository">The statement repository.</param> /// <param name="logger">The logger.</param> /// <param name="monitorableDependencies">The dependency monitor manager</param> /// <exception cref="System.ArgumentNullException"> /// </exception> public TransactionManagerService( [NotNull] IBudgetBucketRepository bucketRepository, [NotNull] IStatementRepository statementRepository, [NotNull] ILogger logger, [NotNull] MonitorableDependencies monitorableDependencies) { if (bucketRepository == null) { throw new ArgumentNullException(nameof(bucketRepository)); } if (statementRepository == null) { throw new ArgumentNullException(nameof(statementRepository)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (monitorableDependencies == null) { throw new ArgumentNullException(nameof(monitorableDependencies)); } this.bucketRepository = bucketRepository; this.statementRepository = statementRepository; this.logger = logger; this.monitorableDependencies = monitorableDependencies; }
public LedgerService( [NotNull] ILedgerBookRepository ledgerRepository, [NotNull] IAccountTypeRepository accountTypeRepository, [NotNull] ILedgerBucketFactory ledgerBucketFactory, [NotNull] MonitorableDependencies monitorableDependencies) { if (ledgerRepository == null) { throw new ArgumentNullException(nameof(ledgerRepository)); } if (accountTypeRepository == null) { throw new ArgumentNullException(nameof(accountTypeRepository)); } if (ledgerBucketFactory == null) { throw new ArgumentNullException(nameof(ledgerBucketFactory)); } if (monitorableDependencies == null) { throw new ArgumentNullException(nameof(monitorableDependencies)); } this.ledgerRepository = ledgerRepository; this.accountTypeRepository = accountTypeRepository; this.ledgerBucketFactory = ledgerBucketFactory; this.monitorableDependencies = monitorableDependencies; }
public TransactionRuleService( [NotNull] IMatchingRuleRepository ruleRepository, [NotNull] ILogger logger, [NotNull] IMatchmaker matchmaker, [NotNull] IMatchingRuleFactory ruleFactory, [NotNull] IEnvironmentFolders environmentFolders, [NotNull] MonitorableDependencies monitorableDependencies, [NotNull] IBudgetBucketRepository bucketRepo) { this.bucketRepo = bucketRepo ?? throw new ArgumentNullException(nameof(bucketRepo)); this.ruleRepository = ruleRepository ?? throw new ArgumentNullException(nameof(ruleRepository)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.matchmaker = matchmaker ?? throw new ArgumentNullException(nameof(matchmaker)); this.ruleFactory = ruleFactory ?? throw new ArgumentNullException(nameof(ruleFactory)); this.environmentFolders = environmentFolders ?? throw new ArgumentNullException(nameof(environmentFolders)); this.monitorableDependencies = monitorableDependencies ?? throw new ArgumentNullException(nameof(monitorableDependencies)); this.matchingRules = new List <MatchingRule>(); this.matchingRulesGroupedByBucket = new List <RulesGroupedByBucket>(); }
public ApplicationDatabaseService( [NotNull] IApplicationDatabaseRepository applicationRepository, [NotNull] IEnumerable <ISupportsModelPersistence> databaseDependents, [NotNull] MonitorableDependencies monitorableDependencies, [NotNull] ICredentialStore credentialStore, [NotNull] ILogger logger) { if (applicationRepository == null) { throw new ArgumentNullException(nameof(applicationRepository)); } if (databaseDependents == null) { throw new ArgumentNullException(nameof(databaseDependents)); } if (monitorableDependencies == null) { throw new ArgumentNullException(nameof(monitorableDependencies)); } if (credentialStore == null) { throw new ArgumentNullException(nameof(credentialStore)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } this.applicationRepository = applicationRepository; this.monitorableDependencies = monitorableDependencies; this.credentialStore = credentialStore; this.logger = logger; this.databaseDependents = databaseDependents.OrderBy(d => d.LoadSequence).ToList(); this.monitorableDependencies.NotifyOfDependencyChange <IApplicationDatabaseService>(this); InitialiseDirtyDataTable(); }
public DashboardService( [NotNull] IWidgetService widgetService, [NotNull] IBudgetBucketRepository bucketRepository, [NotNull] IBudgetRepository budgetRepository, [NotNull] ILogger logger, [NotNull] MonitorableDependencies monitorableDependencies) { if (widgetService == null) { throw new ArgumentNullException(nameof(widgetService)); } if (bucketRepository == null) { throw new ArgumentNullException(nameof(bucketRepository)); } if (budgetRepository == null) { throw new ArgumentNullException(nameof(budgetRepository)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (monitorableDependencies == null) { throw new ArgumentNullException(nameof(monitorableDependencies)); } this.widgetService = widgetService; this.bucketRepository = bucketRepository; this.budgetRepository = budgetRepository; this.logger = logger; this.monitoringServices = monitorableDependencies; this.monitoringServices.DependencyChanged += OnMonitoringServicesDependencyChanged; }