FormDataCollectionExtensions.ReadAs Method

 

Namespace:   System.Web.Http.ModelBinding
Assembly:  System.Web.Http (in System.Web.Http.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static ReadAs(FormDataCollection, Type)

Reads the collection extensions with specified type.

System_CAPS_pubmethodSystem_CAPS_static ReadAs(FormDataCollection, Type, HttpActionContext)

System_CAPS_pubmethodSystem_CAPS_static ReadAs(FormDataCollection, Type, String, HttpActionContext)

System_CAPS_pubmethodSystem_CAPS_static ReadAs(FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger)

Reads the collection extensions with specified type and model name.

System_CAPS_pubmethodSystem_CAPS_static ReadAs(FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger, HttpConfiguration)

Deserialize the form data to the given type, using model binding.

System_CAPS_pubmethodSystem_CAPS_static ReadAs<T>(FormDataCollection)

Reads the collection extensions with specified type.

System_CAPS_pubmethodSystem_CAPS_static ReadAs<T>(FormDataCollection, HttpActionContext)

System_CAPS_pubmethodSystem_CAPS_static ReadAs<T>(FormDataCollection, String, HttpActionContext)

System_CAPS_pubmethodSystem_CAPS_static ReadAs<T>(FormDataCollection, String, IRequiredMemberSelector, IFormatterLogger)

Reads the collection extensions with specified type.

See Also

FormDataCollectionExtensions Class
System.Web.Http.ModelBinding Namespace

Return to top

FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type)

Reads the collection extensions with specified type.

Syntax

public static object ReadAs(
    this FormDataCollection formData,
    Type type
)
public:
[ExtensionAttribute]
static Object^ ReadAs(
    FormDataCollection^ formData,
    Type^ type
)
static member ReadAs : 
        formData:FormDataCollection *
        type:Type -> Object
<ExtensionAttribute>
Public Shared Function ReadAs (
    formData As FormDataCollection,
    type As Type
) As Object

Parameters

Return Value

Type: System.Object

The collection extensions with specified type.

Return to top

FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type, HttpActionContext)

Syntax

public static object ReadAs(
    this FormDataCollection formData,
    Type type,
    HttpActionContext actionContext
)
public:
[ExtensionAttribute]
static Object^ ReadAs(
    FormDataCollection^ formData,
    Type^ type,
    HttpActionContext^ actionContext
)
static member ReadAs : 
        formData:FormDataCollection *
        type:Type *
        actionContext:HttpActionContext -> Object
<ExtensionAttribute>
Public Shared Function ReadAs (
    formData As FormDataCollection,
    type As Type,
    actionContext As HttpActionContext
) As Object

Parameters

Return Value

Type: System.Object

Return to top

FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type, String, HttpActionContext)

Syntax

public static object ReadAs(
    this FormDataCollection formData,
    Type type,
    string modelName,
    HttpActionContext actionContext
)
public:
[ExtensionAttribute]
static Object^ ReadAs(
    FormDataCollection^ formData,
    Type^ type,
    String^ modelName,
    HttpActionContext^ actionContext
)
static member ReadAs : 
        formData:FormDataCollection *
        type:Type *
        modelName:string *
        actionContext:HttpActionContext -> Object
<ExtensionAttribute>
Public Shared Function ReadAs (
    formData As FormDataCollection,
    type As Type,
    modelName As String,
    actionContext As HttpActionContext
) As Object

Parameters

Return Value

Type: System.Object

Return to top

FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger)

Reads the collection extensions with specified type and model name.

Syntax

public static object ReadAs(
    this FormDataCollection formData,
    Type type,
    string modelName,
    IRequiredMemberSelector requiredMemberSelector,
    IFormatterLogger formatterLogger
)
public:
[ExtensionAttribute]
static Object^ ReadAs(
    FormDataCollection^ formData,
    Type^ type,
    String^ modelName,
    IRequiredMemberSelector^ requiredMemberSelector,
    IFormatterLogger^ formatterLogger
)
static member ReadAs : 
        formData:FormDataCollection *
        type:Type *
        modelName:string *
        requiredMemberSelector:IRequiredMemberSelector *
        formatterLogger:IFormatterLogger -> Object
<ExtensionAttribute>
Public Shared Function ReadAs (
    formData As FormDataCollection,
    type As Type,
    modelName As String,
    requiredMemberSelector As IRequiredMemberSelector,
    formatterLogger As IFormatterLogger
) As Object

Parameters

Return Value

Type: System.Object

The collection extensions.

Return to top

FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger, HttpConfiguration)

Deserialize the form data to the given type, using model binding.

Syntax

public static object ReadAs(
    this FormDataCollection formData,
    Type type,
    string modelName,
    IRequiredMemberSelector requiredMemberSelector,
    IFormatterLogger formatterLogger,
    HttpConfiguration config
)
public:
[ExtensionAttribute]
static Object^ ReadAs(
    FormDataCollection^ formData,
    Type^ type,
    String^ modelName,
    IRequiredMemberSelector^ requiredMemberSelector,
    IFormatterLogger^ formatterLogger,
    HttpConfiguration^ config
)
static member ReadAs : 
        formData:FormDataCollection *
        type:Type *
        modelName:string *
        requiredMemberSelector:IRequiredMemberSelector *
        formatterLogger:IFormatterLogger *
        config:HttpConfiguration -> Object
<ExtensionAttribute>
Public Shared Function ReadAs (
    formData As FormDataCollection,
    type As Type,
    modelName As String,
    requiredMemberSelector As IRequiredMemberSelector,
    formatterLogger As IFormatterLogger,
    config As HttpConfiguration
) As Object

Parameters

  • modelName
    Type: System.String

    null or empty to read the entire form as a single object. This is common for body data. Or the name of a model to do a partial binding against the form data. This is common for extracting individual fields.

Return Value

Type: System.Object

best attempt to bind the object. The best attempt may be null.

Return to top

FormDataCollectionExtensions.ReadAs<T> Method (FormDataCollection)

Reads the collection extensions with specified type.

Syntax

public static T ReadAs<T>(
    this FormDataCollection formData
)
public:
generic<typename T>
[ExtensionAttribute]
static T ReadAs(
    FormDataCollection^ formData
)
static member ReadAs<'T> : 
        formData:FormDataCollection -> 'T
<ExtensionAttribute>
Public Shared Function ReadAs(Of T) (
    formData As FormDataCollection
) As T

Parameters

Return Value

Type: T

The read collection extensions.

Type Parameters

  • T
    The generic type.

Return to top

FormDataCollectionExtensions.ReadAs<T> Method (FormDataCollection, HttpActionContext)

Syntax

public static T ReadAs<T>(
    this FormDataCollection formData,
    HttpActionContext actionContext
)
public:
generic<typename T>
[ExtensionAttribute]
static T ReadAs(
    FormDataCollection^ formData,
    HttpActionContext^ actionContext
)
static member ReadAs<'T> : 
        formData:FormDataCollection *
        actionContext:HttpActionContext -> 'T
<ExtensionAttribute>
Public Shared Function ReadAs(Of T) (
    formData As FormDataCollection,
    actionContext As HttpActionContext
) As T

Parameters

Return Value

Type: T

Type Parameters

  • T

Return to top

FormDataCollectionExtensions.ReadAs<T> Method (FormDataCollection, String, HttpActionContext)

Syntax

public static T ReadAs<T>(
    this FormDataCollection formData,
    string modelName,
    HttpActionContext actionContext
)
public:
generic<typename T>
[ExtensionAttribute]
static T ReadAs(
    FormDataCollection^ formData,
    String^ modelName,
    HttpActionContext^ actionContext
)
static member ReadAs<'T> : 
        formData:FormDataCollection *
        modelName:string *
        actionContext:HttpActionContext -> 'T
<ExtensionAttribute>
Public Shared Function ReadAs(Of T) (
    formData As FormDataCollection,
    modelName As String,
    actionContext As HttpActionContext
) As T

Parameters

Return Value

Type: T

Type Parameters

  • T

Return to top

FormDataCollectionExtensions.ReadAs<T> Method (FormDataCollection, String, IRequiredMemberSelector, IFormatterLogger)

Reads the collection extensions with specified type.

Syntax

public static T ReadAs<T>(
    this FormDataCollection formData,
    string modelName,
    IRequiredMemberSelector requiredMemberSelector,
    IFormatterLogger formatterLogger
)
public:
generic<typename T>
[ExtensionAttribute]
static T ReadAs(
    FormDataCollection^ formData,
    String^ modelName,
    IRequiredMemberSelector^ requiredMemberSelector,
    IFormatterLogger^ formatterLogger
)
static member ReadAs<'T> : 
        formData:FormDataCollection *
        modelName:string *
        requiredMemberSelector:IRequiredMemberSelector *
        formatterLogger:IFormatterLogger -> 'T
<ExtensionAttribute>
Public Shared Function ReadAs(Of T) (
    formData As FormDataCollection,
    modelName As String,
    requiredMemberSelector As IRequiredMemberSelector,
    formatterLogger As IFormatterLogger
) As T

Parameters

Return Value

Type: T

The collection extensions.

Type Parameters

  • T
    The generic type.

Return to top