Пример #1
0
        public async Task SetContentAsync(IPageEdit editSession, object content, CancellationToken cancellationToken = default)
        {
            if (editSession == null)
            {
                throw new ArgumentNullException(nameof(editSession));
            }

            var page = await pageService.FindPageByIdAsync(editSession.PageId);

            var pageMetadata = await pageService.GetPageTypeAsync(page);

            var contentData = pageMetadata.ContentMetadata.ConvertContentModelToDictionary(content);

            await editSessionRepository.SetContentAsync(editSession, contentData, cancellationToken);
        }