Table of Contents

Class ValueProviderAttribute

Namespace
System.Web.Http.ValueProviders
Assembly
System.Web.Http.dll

This attribute is used to specify a custom ValueProviderFactory.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
public sealed class ValueProviderAttribute : ModelBinderAttribute
Inheritance
ValueProviderAttribute
Inherited Members

Constructors

ValueProviderAttribute(Type)

Initializes a new instance of the ValueProviderAttribute.

public ValueProviderAttribute(Type valueProviderFactory)

Parameters

valueProviderFactory Type

The type of the model binder.

ValueProviderAttribute(params Type[])

Initializes a new instance of the ValueProviderAttribute.

public ValueProviderAttribute(params Type[] valueProviderFactories)

Parameters

valueProviderFactories Type[]

An array of model binder types.

Properties

ValueProviderFactoryTypes

Gets the types of object returned by the value provider factory.

public IEnumerable<Type> ValueProviderFactoryTypes { get; }

Property Value

IEnumerable<Type>

A collection of types.

Methods

GetValueProviderFactories(HttpConfiguration)

Gets the value provider factories.

public override IEnumerable<ValueProviderFactory> GetValueProviderFactories(HttpConfiguration configuration)

Parameters

configuration HttpConfiguration

A configuration object.

Returns

IEnumerable<ValueProviderFactory>

A collection of value provider factories.