BudgetAnalyser.ShellController.ShellController C# (CSharp) Method

ShellController() public method

public ShellController ( [ uiContext, [ statePersistence, [ persistenceOperations ) : System
uiContext [
statePersistence [
persistenceOperations [
return System
        public ShellController(
            [NotNull] IUiContext uiContext,
            [NotNull] IPersistApplicationState statePersistence,
            [NotNull] PersistenceOperations persistenceOperations
            )
        {
            if (uiContext == null)
            {
                throw new ArgumentNullException(nameof(uiContext));
            }

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

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

            MessengerInstance = uiContext.Messenger;
            MessengerInstance.Register<ShellDialogRequestMessage>(this, OnDialogRequested);
            MessengerInstance.Register<ApplicationStateRequestedMessage>(this, OnApplicationStateRequested);
            MessengerInstance.Register<ApplicationStateLoadedMessage>(this, OnApplicationStateLoaded);

            this.statePersistence = statePersistence;
            this.persistenceOperations = persistenceOperations;
            this.uiContext = uiContext;

            LedgerBookDialog = new ShellDialogController();
            DashboardDialog = new ShellDialogController();
            TransactionsDialog = new ShellDialogController();
            BudgetDialog = new ShellDialogController();
            ReportsDialog = new ShellDialogController();
        }