Show / Hide Table of Contents

Class EnumerableItemProvider

A service which gets an enumerable collection of items to be validated.

Inheritance
System.Object
EnumerableItemProvider
Implements
IGetsEnumerableItemsToBeValidated
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CSF.Validation.RuleExecution
Assembly: CSF.Validation.dll
Syntax
public class EnumerableItemProvider : IGetsEnumerableItemsToBeValidated

Methods

| Improve this Doc View Source

GetEnumerableItems(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 itemType.

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 enumerableValue is null.

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 enumerableValue does not implement System.Collections.Generic.IEnumerable<T> for the type itemType.

System.ArgumentNullException

If itemType is null.

Implements

IGetsEnumerableItemsToBeValidated
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX