public LoadFileController(
            [NotNull] UiContext uiContext,
            [NotNull] IAccountTypeRepository accountTypeRepository,
            [NotNull] IVersionedStatementModelRepository statementModelRepository)
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException("uiContext");
            }

            if (accountTypeRepository == null)
            {
                throw new ArgumentNullException("accountTypeRepository");
            }

            if (statementModelRepository == null)
            {
                throw new ArgumentNullException("statementModelRepository");
            }

            this.messageBox = uiContext.UserPrompts.MessageBox;
            this.statementModelRepository = statementModelRepository;
            this.userPromptOpenFileFactory = uiContext.UserPrompts.OpenFileFactory;
            this.accountTypeRepository = accountTypeRepository;
            UseExistingAccountName = true;

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register<ShellDialogResponseMessage>(this, OnShellDialogResponseReceived);
        }
        public StatementFileManager(
            [NotNull] LoadFileController loadFileController,
            [NotNull] IVersionedStatementModelRepository statementModelRepository,
            [NotNull] IBankStatementImporterRepository importerRepository,
            [NotNull] UiContext uiContext)
        {
            if (loadFileController == null)
            {
                throw new ArgumentNullException("loadFileController");
            }

            if (statementModelRepository == null)
            {
                throw new ArgumentNullException("statementModelRepository");
            }

            if (importerRepository == null)
            {
                throw new ArgumentNullException("importerRepository");
            }

            if (uiContext == null)
            {
                throw new ArgumentNullException("uiContext");
            }

            this.loadFileController = loadFileController;
            this.statementModelRepository = statementModelRepository;
            this.importerRepository = importerRepository;
            this.messageBox = uiContext.UserPrompts.MessageBox;
        }
示例#3
0
        public StatementRepository(
            [NotNull] IVersionedStatementModelRepository statementModelRepository,
            [NotNull] IBankStatementImporterRepository importerRepository)
        {
            if (statementModelRepository == null)
            {
                throw new ArgumentNullException(nameof(statementModelRepository));
            }

            if (importerRepository == null)
            {
                throw new ArgumentNullException(nameof(importerRepository));
            }
            this.statementModelRepository = statementModelRepository;
            this.importerRepository       = importerRepository;
        }
        public StatementRepository(
            [NotNull] IVersionedStatementModelRepository statementModelRepository,
            [NotNull] IBankStatementImporterRepository importerRepository)
        {
            if (statementModelRepository == null)
            {
                throw new ArgumentNullException(nameof(statementModelRepository));
            }

            if (importerRepository == null)
            {
                throw new ArgumentNullException(nameof(importerRepository));
            }
            this.statementModelRepository = statementModelRepository;
            this.importerRepository = importerRepository;
        }