Ziks.WebServer/Controller.cs
/// <summary>
/// Response writer for action methods that return a <see cref="JToken"/>.
/// </summary>
/// <param name="token"><see cref="JToken"/> to be written.</param>
Response writer for action methods that return a .
Response writer for action methods that return a .
[ResponseWriter]
        protected virtual void OnServiceJson( JToken token )
        {
            Response.ContentType = MimeTypeMap.GetMimeType( ".json" );
            using ( var writer = new StreamWriter( Response.OutputStream ) )
            {
                writer.WriteLine( token.ToString( Formatting.Indented ) );
            }
        }
[ ResponseWriter ] protected virtual void OnServiceJson ( JToken token ) { Response . ContentType = MimeTypeMap . GetMimeType ( " " ) ; using ( var writer = new StreamWriter ( Response . OutputStream ) ) { writer . WriteLine ( token . ToString ( Formatting . Indented ) ) ; } }
Response writer for action methods that return a .
Response writer for action methods that return a .
token
JToken
to be written.
to be written .