FormDataCollectionExtensions.ReadAs<T> Method (FormDataCollection, String, IRequiredMemberSelector, IFormatterLogger)
Reads the collection extensions with specified type.
Namespace: System.Web.Http.ModelBinding
Assembly: System.Web.Http (in System.Web.Http.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ReadAs(Of T) ( _
formData As FormDataCollection, _
modelName As String, _
requiredMemberSelector As IRequiredMemberSelector, _
formatterLogger As IFormatterLogger _
) As T
'Usage
Dim formData As FormDataCollection
Dim modelName As String
Dim requiredMemberSelector As IRequiredMemberSelector
Dim formatterLogger As IFormatterLogger
Dim returnValue As T
returnValue = formData.ReadAs(modelName, _
requiredMemberSelector, formatterLogger)
public static T ReadAs<T>(
this FormDataCollection formData,
string modelName,
IRequiredMemberSelector requiredMemberSelector,
IFormatterLogger formatterLogger
)
[ExtensionAttribute]
public:
generic<typename T>
static T ReadAs(
FormDataCollection^ formData,
String^ modelName,
IRequiredMemberSelector^ requiredMemberSelector,
IFormatterLogger^ formatterLogger
)
static member ReadAs :
formData:FormDataCollection *
modelName:string *
requiredMemberSelector:IRequiredMemberSelector *
formatterLogger:IFormatterLogger -> 'T
JScript does not support generic types and methods.
Type Parameters
- T
The generic type.
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.
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).