src/packages/EmbedIO/HttpExceptionHandler.cs
/// <summary>
/// <para>Gets a <see cref="HttpExceptionHandlerCallback"/> that will serialize a HTTP exception's
/// <see cref="IHttpException.DataObject">DataObject</see> property and send it as a JSON response.</para>
/// </summary>
/// <param name="serializerCallback">A <see cref="ResponseSerializerCallback"/> used to serialize data and send it to the client.</param>
/// <returns>A <see cref="HttpExceptionHandlerCallback"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="serializerCallback"/> is <see langword="null"/>.</exception>
Gets a  that will serialize a HTTP exception's
DataObject
Gets a that will serialize a HTTP exception ' s DataObject
public static HttpExceptionHandlerCallback DataResponse(ResponseSerializerCallback serializerCallback)
        {
            Validate.NotNull(nameof(serializerCallback), serializerCallback);
            return (context, httpException) => serializerCallback(context, httpException.DataObject);
        }
public static HttpExceptionHandlerCallback DataResponse ( ResponseSerializerCallback serializerCallback ) { Validate . NotNull ( nameof ( serializerCallback ) , serializerCallback ) ; return ( context , httpException ) => serializerCallback ( context , httpException . DataObject ) ; }
Gets a  that will serialize a HTTP exception's
DataObject
Gets a that will serialize a HTTP exception ' s DataObject
None
None
serializerCallback
ResponseSerializerCallback
A  used to serialize data and send it to the client.
A used to serialize data and send it to the client .