Table of Contents

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 Type

The 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 Type

The model type.

modelBinder IModelBinder

The 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 HttpConfiguration

The configuration.

modelType Type

The model type.

Returns

IModelBinder

The model binder, or null if the attempt to get a model binder is unsuccessful.