示例#1
0
        private static SaveHtmlContentWidgetModel MapHtmlContentWidgetModel(GetHtmlContentWidgetResponse response)
        {
            var model = new SaveHtmlContentWidgetModel
                        {
                            Version = response.Data.Version,
                            Name = response.Data.Name,
                            IsPublished = response.Data.IsPublished,
                            PublishedOn = response.Data.PublishedOn,
                            PublishedByUser = response.Data.PublishedByUser,
                            CategoryId = response.Data.CategoryId,
                            CustomCss = response.Data.CustomCss,
                            UseCustomCss = response.Data.UseCustomCss,
                            Html = response.Data.Html,
                            UseHtml = response.Data.UseHtml,
                            CustomJavaScript = response.Data.CustomJavaScript,
                            UseCustomJavaScript = response.Data.UseCustomJavaScript,
                            Options = response.Options
                        };

            return model;
        }
示例#2
0
        private static SaveHtmlContentWidgetModel MapHtmlContentWidgetModel(GetHtmlContentWidgetResponse response)
        {
            var model = new SaveHtmlContentWidgetModel
                        {
                            Version = response.Data.Version,
                            Name = response.Data.Name,
                            IsPublished = response.Data.IsPublished,
                            PublishedOn = response.Data.PublishedOn,
                            PublishedByUser = response.Data.PublishedByUser,
                            Categories = response.Categories.Select(c => c.Id).ToList(),
                            CustomCss = response.Data.CustomCss,
                            UseCustomCss = response.Data.UseCustomCss,
                            Html = response.Data.Html,
                            UseHtml = response.Data.UseHtml,
                            CustomJavaScript = response.Data.CustomJavaScript,
                            UseCustomJavaScript = response.Data.UseCustomJavaScript,
                            Options = response.Options,
                            ChildContentsOptionValues = response.ChildContentsOptionValues
                        };

            return model;
        }