Ziks.WebServer/Controller.cs
/// <summary>
/// Response writer for action methods that return an <see cref="HtmlElement"/>.
/// </summary>
/// <param name="document"><see cref="HtmlElement"/> to be written.</param>
Response writer for action methods that return an .
Response writer for action methods that return an .
[ResponseWriter]
        protected virtual void OnServiceHtml( HtmlElement document )
        {
            Response.ContentType = MimeTypeMap.GetMimeType( ".html" );
            using ( var writer = new StreamWriter( Response.OutputStream ) )
            {
                writer.WriteLine("<!DOCTYPE html>");
                using ( var serializer = new HtmlSerializer( writer ) )
                {
                    document.Serialize( serializer );
                }
            }
        }
[ ResponseWriter ] protected virtual void OnServiceHtml ( HtmlElement document ) { Response . ContentType = MimeTypeMap . GetMimeType ( " " ) ; using ( var writer = new StreamWriter ( Response . OutputStream ) ) { writer . WriteLine ( " " ) ; using ( var serializer = new HtmlSerializer ( writer ) ) { document . Serialize ( serializer ) ; } } }
Response writer for action methods that return an .
Response writer for action methods that return an .
document
HtmlElement
to be written.
to be written .