/// <summary> /// Creates a new page. /// </summary> /// <param name="space">The space to create the page in.</param> /// <param name="pageName">The name of the page-to-be.</param> /// <param name="content">The initial content of the new page.</param> /// <returns>The newly created page.</returns> public async Task <IPage> CreatePage(ISpace space, PageName pageName, string content) { IPage page = _pageFactory.NewPage(space, pageName); IVersion version = _pageFactory.NewVersion(page, content); await _pageRepository.Add(page, version); return(page); }