Brook.ZhiHuRiBao.Utils.Html.ConstructorHtml C# (CSharp) Метод

ConstructorHtml() публичный статический Метод

public static ConstructorHtml ( Brook.ZhiHuRiBao.Models.MainContent content ) : string
content Brook.ZhiHuRiBao.Models.MainContent
Результат string
        public static string ConstructorHtml(MainContent content)
        {
            if (string.IsNullOrEmpty(content.body))
                return string.Empty;

            var cssBuilder = new StringBuilder();
            var jsBuilder = new StringBuilder();

            content.css.ForEach(o => cssBuilder.Append(string.Format(_cssTemplate, o)));
            content.js.ForEach(o => jsBuilder.Append(string.Format(_jsTemplate, o)));

            var header = string.Format(_headerTemplate, content.image, content.title, content.image_source);
            var source = string.Format(_htmlTemplate, cssBuilder.ToString(), jsBuilder.ToString(), content.body, _notifyScript);

            source = source.Replace("<div class=\"img-place-holder\"></div>", header);

            return source;
        }