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
listIList<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
prefixstringThe 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
prefixstringThe prefix.
Returns
- IDictionary<string, string>
They keys.
GetValue(string)
Returns 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.
GetValue(string, bool)
Returns a value object using the specified key and skip-validation parameter.
public virtual ValueProviderResult GetValue(string key, bool skipValidation)
Parameters
keystringThe key of the value object to retrieve.
skipValidationbooltrue 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
indexintThe zero-based index location at which to insert the value provider into the collection.
itemIValueProviderThe value-provider object to insert.
Exceptions
- ArgumentNullException
The
itemparameter 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
indexintThe zero-based index of the element to replace.
itemIValueProviderThe new value for the element at the specified index.
Exceptions
- ArgumentNullException
The
itemparameter is null.