Share via


ParameterBindingExtensions.BindWithFormatter Method (HttpParameterDescriptor, MediaTypeFormatter[])

Binds parameter by parsing the HTTP body content.

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

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Function BindWithFormatter ( _
    parameter As HttpParameterDescriptor, _
    ParamArray formatters As MediaTypeFormatter() _
) As HttpParameterBinding
'Usage
Dim parameter As HttpParameterDescriptor 
Dim formatters As MediaTypeFormatter()
Dim returnValue As HttpParameterBinding 

returnValue = parameter.BindWithFormatter(formatters)
public static HttpParameterBinding BindWithFormatter(
    this HttpParameterDescriptor parameter,
    params MediaTypeFormatter[] formatters
)
[ExtensionAttribute]
public:
static HttpParameterBinding^ BindWithFormatter(
    HttpParameterDescriptor^ parameter, 
    ... array<MediaTypeFormatter^>^ formatters
)
static member BindWithFormatter : 
        parameter:HttpParameterDescriptor * 
        formatters:MediaTypeFormatter[] -> HttpParameterBinding
public static function BindWithFormatter(
    parameter : HttpParameterDescriptor, 
    ... formatters : MediaTypeFormatter[]
) : HttpParameterBinding

Parameters

Return Value

Type: System.Web.Http.Controllers.HttpParameterBinding
The HTTP parameter binding object.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type HttpParameterDescriptor. 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).

See Also

Reference

ParameterBindingExtensions Class

BindWithFormatter Overload

System.Web.Http.Controllers Namespace