public NewRuleController(
            [NotNull] UiContext uiContext,
            [NotNull] ITransactionRuleService rulesService,
            [NotNull] IBudgetBucketRepository bucketRepo)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (rulesService == null)
            {
                throw new ArgumentNullException(nameof(rulesService));
            }

            if (bucketRepo == null)
            {
                throw new ArgumentNullException(nameof(bucketRepo));
            }

            this.rulesService = rulesService;
            this.bucketRepo = bucketRepo;
            this.messageBoxService = uiContext.UserPrompts.MessageBox;
            this.logger = uiContext.Logger;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
        }
        public NewRuleController(
            [NotNull] UiContext uiContext,
            [NotNull] ITransactionRuleService rulesService,
            [NotNull] IBudgetBucketRepository bucketRepo)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (rulesService == null)
            {
                throw new ArgumentNullException(nameof(rulesService));
            }

            if (bucketRepo == null)
            {
                throw new ArgumentNullException(nameof(bucketRepo));
            }

            this.rulesService      = rulesService;
            this.bucketRepo        = bucketRepo;
            this.messageBoxService = uiContext.UserPrompts.MessageBox;
            this.logger            = uiContext.Logger;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
        }
        public RulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;

            this.questionBox  = uiContext.UserPrompts.YesNoBox;
            NewRuleController = uiContext.NewRuleController;
            MessengerInstance = uiContext.Messenger;

            this.ruleService.Closed += OnClosedNotificationReceived;
            this.ruleService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
示例#4
0
        public RulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;

            this.questionBox = uiContext.UserPrompts.YesNoBox;
            NewRuleController = uiContext.NewRuleController;
            MessengerInstance = uiContext.Messenger;

            this.ruleService.Closed += OnClosedNotificationReceived;
            this.ruleService.NewDataSourceAvailable += OnNewDataSourceAvailableNotificationReceived;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
        public DisusedRulesController(IMessenger messenger, ITransactionRuleService ruleService, IApplicationDatabaseService dbService)
        {
            this.ruleService = ruleService;
            this.dbService = dbService;
            if (messenger == null) throw new ArgumentNullException(nameof(messenger));
            if (ruleService == null) throw new ArgumentNullException(nameof(ruleService));
            if (dbService == null) throw new ArgumentNullException(nameof(dbService));

            MessengerInstance = messenger;
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
            MessengerInstance.Register<WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
        }
示例#6
0
        public DisusedRulesController(IMessenger messenger, ITransactionRuleService ruleService, IApplicationDatabaseService dbService)
        {
            this.ruleService = ruleService;
            this.dbService   = dbService;
            if (messenger == null)
            {
                throw new ArgumentNullException(nameof(messenger));
            }
            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }
            if (dbService == null)
            {
                throw new ArgumentNullException(nameof(dbService));
            }

            MessengerInstance = messenger;
            MessengerInstance.Register <ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
            MessengerInstance.Register <WidgetActivatedMessage>(this, OnWidgetActivatedMessageReceived);
        }
        public ReconciliationCreationManager([NotNull] ITransactionRuleService transactionRuleService,
                                             [NotNull] IReconciliationConsistency reconciliationConsistency,
                                             [NotNull] ILogger logger)
        {
            if (transactionRuleService == null)
            {
                throw new ArgumentNullException(nameof(transactionRuleService));
            }

            if (reconciliationConsistency == null)
            {
                throw new ArgumentNullException(nameof(reconciliationConsistency));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            this.transactionRuleService    = transactionRuleService;
            this.reconciliationConsistency = reconciliationConsistency;
            this.logger = logger;
        }
        public ReconciliationManager([NotNull] ITransactionRuleService transactionRuleService,
                                     [NotNull] IReconciliationConsistency reconciliationConsistency,
                                     [NotNull] ILogger logger)
        {
            if (transactionRuleService == null)
            {
                throw new ArgumentNullException(nameof(transactionRuleService));
            }

            if (reconciliationConsistency == null)
            {
                throw new ArgumentNullException(nameof(reconciliationConsistency));
            }

            if (logger == null)
            {
                throw new ArgumentNullException(nameof(logger));
            }

            this.transactionRuleService = transactionRuleService;
            this.reconciliationConsistency = reconciliationConsistency;
            this.logger = logger;
        }
        public AppliedRulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            RulesController = uiContext.RulesController;
            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.statementController = uiContext.StatementController;
            this.messageBox = uiContext.UserPrompts.MessageBox;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }
示例#10
0
        public AppliedRulesController([NotNull] IUiContext uiContext, [NotNull] ITransactionRuleService ruleService, [NotNull] IApplicationDatabaseService applicationDatabaseService)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

            if (ruleService == null)
            {
                throw new ArgumentNullException(nameof(ruleService));
            }

            if (applicationDatabaseService == null)
            {
                throw new ArgumentNullException(nameof(applicationDatabaseService));
            }

            RulesController  = uiContext.RulesController;
            this.ruleService = ruleService;
            this.applicationDatabaseService = applicationDatabaseService;
            this.statementController        = uiContext.StatementController;
            this.messageBox         = uiContext.UserPrompts.MessageBox;
            this.ruleService.Saved += OnSavedNotificationReceived;
        }