FormDataCollectionExtensions.ReadAs Method
Namespace: System.Web.Http.ModelBinding
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
ReadAs(FormDataCollection, Type) | Reads the collection extensions with specified type. |
|
ReadAs(FormDataCollection, Type, HttpActionContext) | ||
ReadAs(FormDataCollection, Type, String, HttpActionContext) | ||
ReadAs(FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger) | Reads the collection extensions with specified type and model name. |
|
ReadAs(FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger, HttpConfiguration) | Deserialize the form data to the given type, using model binding. |
|
ReadAs<T>(FormDataCollection) | Reads the collection extensions with specified type. |
|
ReadAs<T>(FormDataCollection, HttpActionContext) | ||
ReadAs<T>(FormDataCollection, String, HttpActionContext) | ||
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
formData
Type: System.Net.Http.Formatting.FormDataCollectionThe form data.
type
Type: System.TypeThe type of the object.
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
- formData
Type: System.Net.Http.Formatting.FormDataCollection
- type
Type: System.Type
- actionContext
Type: System.Web.Http.Controllers.HttpActionContext
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
- formData
Type: System.Net.Http.Formatting.FormDataCollection
- type
Type: System.Type
- modelName
Type: System.String
- actionContext
Type: System.Web.Http.Controllers.HttpActionContext
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
formData
Type: System.Net.Http.Formatting.FormDataCollectionThe form data.
type
Type: System.TypeThe type of the object.
modelName
Type: System.StringThe name of the model.
requiredMemberSelector
Type: System.Net.Http.Formatting.IRequiredMemberSelectorThe required member selector.
formatterLogger
Type: System.Net.Http.Formatting.IFormatterLoggerThe formatter logger.
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
formData
Type: System.Net.Http.Formatting.FormDataCollectioncollection with parsed form url data
type
Type: System.Typetarget type to read as
modelName
Type: System.Stringnull 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.
requiredMemberSelector
Type: System.Net.Http.Formatting.IRequiredMemberSelectorThe IRequiredMemberSelector used to determine required members.
formatterLogger
Type: System.Net.Http.Formatting.IFormatterLoggerThe IFormatterLogger to log events to.
config
Type: System.Web.Http.HttpConfigurationThe HttpConfiguration configuration to pick binder from. Can be null if the config was not created already. In that case a new config is created.
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
formData
Type: System.Net.Http.Formatting.FormDataCollectionThe form data.
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
- formData
Type: System.Net.Http.Formatting.FormDataCollection
- actionContext
Type: System.Web.Http.Controllers.HttpActionContext
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
- formData
Type: System.Net.Http.Formatting.FormDataCollection
- modelName
Type: System.String
- actionContext
Type: System.Web.Http.Controllers.HttpActionContext
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
formData
Type: System.Net.Http.Formatting.FormDataCollectionThe form data.
modelName
Type: System.StringThe name of the model.
requiredMemberSelector
Type: System.Net.Http.Formatting.IRequiredMemberSelectorThe required member selector.
formatterLogger
Type: System.Net.Http.Formatting.IFormatterLoggerThe formatter logger.
Return Value
Type: T
The collection extensions.
Type Parameters
- T
The generic type.
Return to top