Table of Contents

Class CompositeValueProvider

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

Represents a value provider whose values come from a list of value providers that implements the IEnumerable interface.

public class CompositeValueProvider : Collection<IValueProvider>, IList<IValueProvider>, ICollection<IValueProvider>, IList, ICollection, IReadOnlyList<IValueProvider>, IReadOnlyCollection<IValueProvider>, IEnumerable<IValueProvider>, IEnumerable, IEnumerableValueProvider, IValueProvider
Inheritance
CompositeValueProvider
Implements
Inherited Members

Constructors

CompositeValueProvider()

Initializes a new instance of the CompositeValueProvider class.

public CompositeValueProvider()

CompositeValueProvider(IList<IValueProvider>)

Initializes a new instance of the CompositeValueProvider class.

public CompositeValueProvider(IList<IValueProvider> list)

Parameters

list IList<IValueProvider>

The list of value providers.

Methods

ContainsPrefix(string)

Determines whether the collection contains the specified prefix.

public virtual bool ContainsPrefix(string prefix)

Parameters

prefix string

The prefix to search for.

Returns

bool

true if the collection contains the specified prefix; otherwise, false.

GetKeysFromPrefix(string)

Retrieves the keys from the specified prefix.

public virtual IDictionary<string, string> GetKeysFromPrefix(string prefix)

Parameters

prefix string

The prefix from which keys are retrieved.

Returns

IDictionary<string, string>

The keys from the specified prefix.

GetValue(string)

Retrieves a value object using the specified key.

public virtual ValueProviderResult GetValue(string key)

Parameters

key string

The key of the value object to retrieve.

Returns

ValueProviderResult

The value object for the specified key.

InsertItem(int, IValueProvider)

Inserts an element into the collection at the specified index.

protected override void InsertItem(int index, IValueProvider item)

Parameters

index int

The zero-based index at which item should be inserted.

item IValueProvider

The object to insert.

SetItem(int, IValueProvider)

Replaces the element at the specified index.

protected override void SetItem(int index, IValueProvider item)

Parameters

index int

The zero-based index of the element to replace.

item IValueProvider

The new value for the element at the specified index.