Exemple #1
0
        public IEnumerable <PageModuleDisplayModelMapperOutput> Map(IEnumerable <PageModuleDisplayModelMapperInput <RichTextDataModel> > inputs, WorkFlowStatusQuery workflowStatus)
        {
            foreach (var input in inputs)
            {
                var output = new RichTextDisplayModel();
                output.RawHtml = new HtmlString(input.DataModel.RawHtml);

                yield return(input.CreateOutput(output));
            }
        }
Exemple #2
0
        public Task MapAsync(
            PageBlockTypeDisplayModelMapperContext <RichTextDataModel> context,
            PageBlockTypeDisplayModelMapperResult <RichTextDataModel> result
            )
        {
            foreach (var item in context.Items)
            {
                var displayModel = new RichTextDisplayModel();
                displayModel.RawHtml = new HtmlString(item.DataModel.RawHtml);

                result.Add(item, displayModel);
            }

            return(Task.CompletedTask);
        }
Exemple #3
0
        public Task <IEnumerable <PageBlockTypeDisplayModelMapperOutput> > MapAsync(
            IReadOnlyCollection <PageBlockTypeDisplayModelMapperInput <RichTextDataModel> > inputCollection,
            PublishStatusQuery publishStatusQuery
            )
        {
            var results = new List <PageBlockTypeDisplayModelMapperOutput>(inputCollection.Count);

            foreach (var input in inputCollection)
            {
                var output = new RichTextDisplayModel();
                output.RawHtml = new HtmlString(input.DataModel.RawHtml);

                results.Add(input.CreateOutput(output));
            }

            return(Task.FromResult(results.AsEnumerable()));
        }