Class EnumerableItemProvider
A service which gets an enumerable collection of items to be validated.
Inheritance
Implements
Inherited Members
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public class EnumerableItemProvider : IGetsEnumerableItemsToBeValidated
Methods
| Improve this Doc View SourceGetEnumerableItems(Object, Type)
Gets an enumerable collection of item values to be validatated.
Declaration
public IEnumerable<object> GetEnumerableItems(object enumerableValue, Type itemType)
Parameters
Type | Name | Description |
---|---|---|
System.Object | enumerableValue | A value to be validated, which must implement
System.Collections.Generic.IEnumerable<T> for a generic type specified by |
System.Type | itemType | The expected generic type of the enumerable collection. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Object> | Either a collection of item values from the enumerable, or a null reference
if |
Remarks
Note that executing this method will enumerate the source collection and crystalise it into a finite collection. The order of items is defined by the order in which the source System.Collections.Generic.IEnumerable<T> provided them. There is no certainty that executing this method more than once would provide the items in the same order (or even the same items each time).
Exceptions
Type | Condition |
---|---|
ValidationException | If the |
System.ArgumentNullException | If |