Blighttp.Document.Render C# (CSharp) Метод

Render() публичный Метод

public Render ( string bodyContent ) : string
bodyContent string
Результат string
        public string Render(string bodyContent)
        {
            string charset = Markup.Meta(Markup.GetAttributes("charset", "utf-8"));
            string title = Markup.Title(Title);
            string headContent = charset + title;
            if (Icon != null)
                headContent += Markup.MetaLink("icon", Markup.GetAttributes("type", "image/ico", "href", Icon));
            if (Stylesheet != null)
                headContent += Markup.MetaLink("stylesheet", Markup.GetAttributes("type", "text/css", "media", "screen", "href", Stylesheet));
            string head = Markup.Head(headContent);
            string body = Markup.Body(bodyContent);
            string output = Markup.Html(head + body);
            return output;
        }

Usage Example

Пример #1
0
 static Reply SubmissionTest(Request request)
 {
     Document document = new Document("Submission");
     string body = "";
     foreach (var entry in request.Content)
         body += Markup.Paragraph(string.Format("{0}: {1}", entry.Key, entry.Value));
     Reply reply = new Reply(document.Render(body));
     return reply;
 }
All Usage Examples Of Blighttp.Document::Render