public static string OutputMarkup(IMarkupContent content)
        {
            var filename = ((IContent)content).Name;

            if (String.IsNullOrWhiteSpace(Path.GetExtension(filename)))
            {
                filename = string.Concat(filename, ".html");
            }
            var e = new MarkupEventArgs(filename, null, content.Markup);

            e.ContentData = (IContent)content;
            OnBeforeOutputMarkup(null, e);
            return(e.Text);
        }
Exemple #2
0
        public static void ProcessStandardReferences(IMarkupContent content)
        {
            // Add each line of the script references
            GetLines(content.ScriptReferences).ForEach(u =>
            {
                AddScriptReference((IContent)content, u);
            });

            // Add each line of the style references
            GetLines(content.StylesheetReferences).ForEach(u =>
            {
                AddStylesheetReference((IContent)content, u);
            });

            // Add the inlines
            AddInlineScript((IContent)content, content.InlineScripts);
            AddInlineStyles((IContent)content, content.InlineStyles);

            // Add the resoureces
            content.GetResources().ToList().ForEach(r =>
            {
                AddReference((IContent)content, r);
            });
        }