Exemplo n.º 1
0
        public AddSectionViewModel(ISectionFacade section, IIoC ioc) : base(ioc)
        {
            if (section == null)
            {
                throw new ArgumentNullException(nameof(section));
            }
            _section = section;

            MessageBus.Subscribe <NotebookSelected>(OnNotebookSelected);
        }
Exemplo n.º 2
0
        public ListPagesViewModel(ISectionFacade section, IPageFacade page, IIoC ioc) : base(ioc)
        {
            if (section == null) throw new ArgumentNullException(nameof(section));
            if (page == null) throw new ArgumentNullException(nameof(page));
            _section = section;
            _page = page;

            Pages = new ItemChangeAwareObservableCollection<PageDto>();

            MessageBus.Subscribe<SectionSelected>(async msg => await OnSectionSelected(msg));
            MessageBus.Subscribe<PageCreated>(async msg => await OnPageCreated(msg));
        }
Exemplo n.º 3
0
        public ListPagesViewModel(ISectionFacade section, IPageFacade page, IIoC ioc) : base(ioc)
        {
            if (section == null)
            {
                throw new ArgumentNullException(nameof(section));
            }
            if (page == null)
            {
                throw new ArgumentNullException(nameof(page));
            }
            _section = section;
            _page    = page;

            Pages = new ItemChangeAwareObservableCollection <PageDto>();

            MessageBus.Subscribe <SectionSelected>(async msg => await OnSectionSelected(msg));
            MessageBus.Subscribe <PageCreated>(async msg => await OnPageCreated(msg));
        }
Exemplo n.º 4
0
        public NotebookActor(ISectionFacade section, IRootDirectoryFacade rootDirectory, ILogger logger)
            : base(logger)
        {
            if (section == null) throw new ArgumentNullException(nameof(section));
            if (rootDirectory == null) throw new ArgumentNullException(nameof(rootDirectory));

            _section = section;
            _rootDirectory = rootDirectory;

            Receive<CreateNotebook>(msg => OnCreateNotebook(msg));
            Receive<GetNotebooks>(msg =>
            {
                var originalSender = Sender;
                OnGetNotebooks(msg, originalSender);
            });

            Receive<Internal.GotCurrentRootDirectoryResult>(msg => OnGotCurrentRootDirectoryResult(msg));
            Receive<Internal.SetNotebookSectionsResult>(msg => OnSectionsHasBeenSetOnNotebooks(msg));
        }
Exemplo n.º 5
0
        public NotebookActor(ISectionFacade section, IRootDirectoryFacade rootDirectory, ILogger logger) : base(logger)
        {
            if (section == null)
            {
                throw new ArgumentNullException(nameof(section));
            }
            if (rootDirectory == null)
            {
                throw new ArgumentNullException(nameof(rootDirectory));
            }

            _section       = section;
            _rootDirectory = rootDirectory;

            Receive <CreateNotebook>(msg => OnCreateNotebook(msg));
            Receive <GetNotebooks>(msg =>
            {
                var originalSender = Sender;
                OnGetNotebooks(msg, originalSender);
            });

            Receive <Internal.GotCurrentRootDirectoryResult>(msg => OnGotCurrentRootDirectoryResult(msg));
            Receive <Internal.SetNotebookSectionsResult>(msg => OnSectionsHasBeenSetOnNotebooks(msg));
        }
 public SectionController(ISectionFacade facade)
 {
     this.facade = facade;
 }