GoXam for WPF v3
ReadElements<T> Method
Northwoods.GoXam.Model Namespace > XHelper Class : ReadElements<T> Method
the item data type
the XContainer to be read
the name of the child elements
an empty collection to which items are added
a conversion function from String to the item data type, T
Consume an XContainer that is assumed to hold a collection of nested child XElements each holding a value to be converted to the given data type.
Syntax
public static IEnumerable ReadElements<T>( 
   XContainer e,
   XName c,
   ICollection<T> coll,
   Func<string,T> conv
)

Parameters

e
the XContainer to be read
c
the name of the child elements
coll
an empty collection to which items are added
conv
a conversion function from String to the item data type, T

Type Parameters

T
the item data type

Return Value

the coll collection, containing all of the data items that were read
Remarks
If there is an exception converting any of the child elements to data values, this will return the collection gathered so far.
See Also

Reference

XHelper Class
XHelper Members