Interface IGetsEnumerableItemsToBeValidated
An object which can get a System.Collections.Generic.IEnumerable<T> of individual items to be validated, based upon an object which should implement the correct enumerable interface and an intended type.
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public interface IGetsEnumerableItemsToBeValidated
Methods
| Improve this Doc View SourceGetEnumerableItems(Object, Type)
Gets an enumerable collection of item values to be validatated.
Declaration
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 |