Class KeyValuePairModelBinder<TKey, TValue>
- Namespace
- System.Web.Http.ModelBinding.Binders
- Assembly
- System.Web.Http.dll
Maps a browser request to a key/value pair data object.
public sealed class KeyValuePairModelBinder<TKey, TValue> : IModelBinder
Type Parameters
TKeyThe type of the key.
TValueThe type of the value.
- Inheritance
-
KeyValuePairModelBinder<TKey, TValue>
- Implements
- Inherited Members
Constructors
KeyValuePairModelBinder()
Initializes a new instance of the KeyValuePairModelBinder<TKey, TValue> class.
public KeyValuePairModelBinder()
Methods
BindModel(HttpActionContext, ModelBindingContext)
Binds the model by using the specified execution context and binding context.
public bool BindModel(HttpActionContext actionContext, ModelBindingContext bindingContext)
Parameters
actionContextHttpActionContextThe action context.
bindingContextModelBindingContextThe binding context.
Returns
- bool
true if model binding is successful; otherwise, false.