Class SimpleModelBinderProvider
- Namespace
- System.Web.Http.ModelBinding.Binders
- Assembly
- System.Web.Http.dll
No content here will be updated; please do not add material here.
public sealed class SimpleModelBinderProvider : ModelBinderProvider
- Inheritance
-
SimpleModelBinderProvider
- Inherited Members
Constructors
SimpleModelBinderProvider(Type, Func<IModelBinder>)
Initializes a new instance of the SimpleModelBinderProvider class.
public SimpleModelBinderProvider(Type modelType, Func<IModelBinder> modelBinderFactory)
Parameters
modelType
TypeThe model type.
modelBinderFactory
Func<IModelBinder>The model binder factory.
SimpleModelBinderProvider(Type, IModelBinder)
Initializes a new instance of the SimpleModelBinderProvider class by using the specified model type and the model binder.
public SimpleModelBinderProvider(Type modelType, IModelBinder modelBinder)
Parameters
modelType
TypeThe model type.
modelBinder
IModelBinderThe model binder.
Properties
ModelType
Gets the type of the model.
public Type ModelType { get; }
Property Value
- Type
The type of the model.
SuppressPrefixCheck
Gets or sets a value that specifies whether the prefix check should be suppressed.
public bool SuppressPrefixCheck { get; set; }
Property Value
- bool
true if the prefix check should be suppressed; otherwise, false.
Methods
GetBinder(HttpConfiguration, Type)
Returns a model binder by using the specified execution context and binding context.
public override IModelBinder GetBinder(HttpConfiguration configuration, Type modelType)
Parameters
configuration
HttpConfigurationThe configuration.
modelType
TypeThe model type.
Returns
- IModelBinder
The model binder, or null if the attempt to get a model binder is unsuccessful.