Unosquare
    Show / Hide Table of Contents

    Interface INonNullRequestDataAttribute<TController, TData>

    Represents an attribute, applied to a parameter of a web API controller method, that causes the parameter to be passed deserialized data from a request.

    The difference between this interface and IRequestDataAttribute<TController, TData> is that attributes implementing this interface never retrieve null values.

    Namespace: EmbedIO.WebApi
    Syntax
    public interface INonNullRequestDataAttribute<in TController, TData>
        where TController : WebApiController where TData : class
    Type Parameters
    Name Description
    TController

    The type of the controller.

    TData

    The type of the data.

    Methods

    GetRequestDataAsync(TController, String)

    Asynchronously obtains data from a controller's context.

    Declaration
    Task<TData> GetRequestDataAsync(TController controller, string parameterName)
    Parameters
    Type Name Description
    TController controller

    The controller.

    String parameterName

    The name of the parameter that has to receive the data.

    Returns
    Type Description
    Task<TData>

    a whose result will be the data to pass as a parameter to a controller method.

    See Also

    IRequestDataAttribute<TController>
    IRequestDataAttribute<TController, TData>

    Comments

    Back to top Copyright © 2017-2019 Unosquare