FormDataCollectionExtensions.ReadAs Method (FormDataCollection, Type, String, IRequiredMemberSelector, IFormatterLogger)
Reads the collection extensions with specified type and model name.
Namespace: System.Web.Http.ModelBinding
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ReadAs ( _
formData As FormDataCollection, _
type As Type, _
modelName As String, _
requiredMemberSelector As IRequiredMemberSelector, _
formatterLogger As IFormatterLogger _
) As Object
'Usage
Dim formData As FormDataCollection
Dim type As Type
Dim modelName As String
Dim requiredMemberSelector As IRequiredMemberSelector
Dim formatterLogger As IFormatterLogger
Dim returnValue As Object
returnValue = formData.ReadAs(type, _
modelName, requiredMemberSelector, _
formatterLogger)
public static Object ReadAs(
this FormDataCollection formData,
Type type,
string modelName,
IRequiredMemberSelector requiredMemberSelector,
IFormatterLogger formatterLogger
)
[ExtensionAttribute]
public:
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
public static function ReadAs(
formData : FormDataCollection,
type : Type,
modelName : String,
requiredMemberSelector : IRequiredMemberSelector,
formatterLogger : IFormatterLogger
) : 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.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type FormDataCollection. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.108) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.108).