public LedgerBookControllerFileOperations( [NotNull] IMessenger messenger, [NotNull] IApplicationDatabaseService applicationDatabaseService) { if (messenger == null) { throw new ArgumentNullException(nameof(messenger)); } if (applicationDatabaseService == null) { throw new ArgumentNullException(nameof(applicationDatabaseService)); } this.applicationDatabaseService = applicationDatabaseService; MessengerInstance = messenger; ViewModel = new LedgerBookViewModel(); }
public LedgerBookControllerFileOperations( [NotNull] IMessenger messenger, [NotNull] IApplicationDatabaseService applicationDatabaseService) { if (messenger == null) { throw new ArgumentNullException(nameof(messenger)); } if (applicationDatabaseService == null) { throw new ArgumentNullException(nameof(applicationDatabaseService)); } this.applicationDatabaseService = applicationDatabaseService; MessengerInstance = messenger; ViewModel = new LedgerBookViewModel(); }
public LedgerBookControllerFileOperations( [NotNull] UiContext uiContext, [NotNull] IMessenger messenger, [NotNull] ILedgerBookRepository ledgerBookRepository, [NotNull] DemoFileHelper demoFileHelper) { if (uiContext == null) { throw new ArgumentNullException("uiContext"); } if (messenger == null) { throw new ArgumentNullException("messenger"); } if (ledgerBookRepository == null) { throw new ArgumentNullException("ledgerBookRepository"); } if (demoFileHelper == null) { throw new ArgumentNullException("demoFileHelper"); } this.saveFileDialogFactory = uiContext.UserPrompts.SaveFileFactory; this.openFileDialogFactory = uiContext.UserPrompts.OpenFileFactory; this.questionBox = uiContext.UserPrompts.YesNoBox; this.messageBox = uiContext.UserPrompts.MessageBox; this.waitCursorFactory = uiContext.WaitCursorFactory; this.ledgerRepository = ledgerBookRepository; this.demoFileHelper = demoFileHelper; MessengerInstance = messenger; ViewModel = new LedgerBookViewModel(); }