Class ValueProviderCollection
Represents the collection of value-provider objects for the application.
public class ValueProviderCollection : Collection<IValueProvider>, IList<IValueProvider>, ICollection<IValueProvider>, IList, ICollection, IReadOnlyList<IValueProvider>, IReadOnlyCollection<IValueProvider>, IEnumerable<IValueProvider>, IEnumerable, IUnvalidatedValueProvider, IEnumerableValueProvider, IValueProvider
- Inheritance
-
ValueProviderCollection
- Implements
- Inherited Members
Constructors
ValueProviderCollection()
Initializes a new instance of the ValueProviderCollection class.
public ValueProviderCollection()
ValueProviderCollection(IList<IValueProvider>)
Initializes a new instance of the ValueProviderCollection class and registers the specified value providers.
public ValueProviderCollection(IList<IValueProvider> list)
Parameters
list
IList<IValueProvider>The list of value providers to register.
Methods
ContainsPrefix(string)
Determines whether the collection contains the specified prefix.
public virtual bool ContainsPrefix(string prefix)
Parameters
prefix
stringThe prefix to search for.
Returns
- bool
true if the collection contains the specified prefix; otherwise, false.
GetKeysFromPrefix(string)
Gets the keys using the specified prefix.
public virtual IDictionary<string, string> GetKeysFromPrefix(string prefix)
Parameters
prefix
stringThe prefix.
Returns
- IDictionary<string, string>
They keys.
GetValue(string)
Returns a value object using the specified key.
public virtual ValueProviderResult GetValue(string key)
Parameters
key
stringThe key of the value object to retrieve.
Returns
- ValueProviderResult
The value object for the specified key.
GetValue(string, bool)
Returns a value object using the specified key and skip-validation parameter.
public virtual ValueProviderResult GetValue(string key, bool skipValidation)
Parameters
key
stringThe key of the value object to retrieve.
skipValidation
booltrue to specify that validation should be skipped; otherwise, false.
Returns
- ValueProviderResult
The value object for the specified key.
InsertItem(int, IValueProvider)
Inserts the specified value-provider object into the collection at the specified index location.
protected override void InsertItem(int index, IValueProvider item)
Parameters
index
intThe zero-based index location at which to insert the value provider into the collection.
item
IValueProviderThe value-provider object to insert.
Exceptions
- ArgumentNullException
The
item
parameter is null.
SetItem(int, IValueProvider)
Replaces the value provider at the specified index location with a new value provider.
protected override void SetItem(int index, IValueProvider item)
Parameters
index
intThe zero-based index of the element to replace.
item
IValueProviderThe new value for the element at the specified index.
Exceptions
- ArgumentNullException
The
item
parameter is null.