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
listIList<IValueProvider>The list of value providers.
Methods
ContainsPrefix(string)
Determines whether the collection contains the specified prefix.
public virtual bool ContainsPrefix(string prefix)
Parameters
prefixstringThe 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
prefixstringThe 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
keystringThe 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
indexintThe zero-based index at which
itemshould be inserted.itemIValueProviderThe object to insert.
SetItem(int, IValueProvider)
Replaces the element at the specified index.
protected override void SetItem(int index, IValueProvider item)
Parameters
indexintThe zero-based index of the element to replace.
itemIValueProviderThe new value for the element at the specified index.