private ImmutableArray<PageDto> GetPages(SectionDto section) { var files = GetFilesUnderDirectory(section.Directory); var pages = CreatePagesFromFiles(files); return SetParentSectionAndNotebook(pages, section); }
public async Task<ImmutableArray<PageDto>> GetPagesForSection(IActorRef actor, SectionDto section) { var answer = await actor.Ask(new PageActor.GetPagesForSection(section)); if (answer is PageActor.GetPagesForSectionResult) { var result = answer as PageActor.GetPagesForSectionResult; return result.Pages; } LogFailure(answer); return ImmutableArray<PageDto>.Empty; }
private void OnSectionSelected(SectionSelected message) { _selectedSection = message.Section; }
public void AddSection(SectionDto section) { Sections = Sections.Add(section); }
private ImmutableArray<PageDto> SetParentSectionAndNotebook(ImmutableArray<PageDto> pages, SectionDto section) { pages.ForEach(page => { page.ParentSection = section; page.ParentNotebook = section.ParentNotebook; }); return pages; }
public GetPagesForSection(SectionDto section) { Section = section; }
public SectionSelected(SectionDto section) { Section = section; }
public async Task<ImmutableArray<PageDto>> GetPagesForSection(SectionDto section) { var actor = ActorSystem.ActorOf(ActorRegistry.Page); return await GetPagesForSection(actor, section); }