Unosquare
    Show / Hide Table of Contents

    Class RequestDeserializer

    Provides standard request deserialization callbacks.

    Inheritance
    Object
    RequestDeserializer
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: EmbedIO
    Syntax
    public static class RequestDeserializer

    Methods

    Default<TData>(IHttpContext)

    The default request deserializer used by EmbedIO.

    Equivalent to Json<TData>(IHttpContext).

    Declaration
    public static Task<TData> Default<TData>(IHttpContext context)
    Parameters
    Type Name Description
    IHttpContext context

    The IHttpContext whose request body is to be deserialized.

    Returns
    Type Description
    Task<TData>

    A Task, representing the ongoing operation, whose result will be the deserialized data.

    Type Parameters
    Name Description
    TData

    The expected type of the deserialized data.

    Json<TData>(IHttpContext)

    Asynchronously deserializes a request body in JSON format.

    Declaration
    public static Task<TData> Json<TData>(IHttpContext context)
    Parameters
    Type Name Description
    IHttpContext context

    The IHttpContext whose request body is to be deserialized.

    Returns
    Type Description
    Task<TData>

    A Task, representing the ongoing operation, whose result will be the deserialized data.

    Type Parameters
    Name Description
    TData

    The expected type of the deserialized data.

    Json<TData>(JsonSerializerCase)

    Returns a RequestDeserializerCallback<TData> that will deserialize an HTTP request body in JSON format, using the specified property name casing.

    Declaration
    public static RequestDeserializerCallback<TData> Json<TData>(JsonSerializerCase jsonSerializerCase)
    Parameters
    Type Name Description
    JsonSerializerCase jsonSerializerCase

    The to use.

    Returns
    Type Description
    RequestDeserializerCallback<TData>

    A RequestDeserializerCallback<TData> that can be used to deserialize a JSON request body.

    Type Parameters
    Name Description
    TData

    The expected type of the deserialized data.

    Comments

    Back to top Copyright © 2017-2019 Unosquare