Appendix B. Technical FAQ
Contents
[
Hide
]
This section reveals some technical aspects and implementation details related to LINQ Reporting Engine. This information can be useful for you while making design decisions for your applications. The information is provided in a question-answer form.
How is the type of an enumeration item implicitly determined by the engine in template expressions?
If you do not specify the type of an enumeration item in a foreach
statement or lambda function signature within your template explicitly, the type is implicitly determined by the engine from the type of the enumeration as follows:
- If the enumeration represents a
DataTable
instance, then the item represents its row. - Otherwise, if the enumeration represents child rows of a
DataTable
row, then the item represents a child row. - Otherwise, if the enumeration implements generic
Iterable<T>
, then the item type is a type argument corresponding to T. Note, that in some cases it is impossible to extract type arguments at runtime due to the Java Type Erasure feature. That is why, the engine is capable to extract the item type only if one of the following conditions is met:- The enumeration expression represents an invocation of a type member which return type is a parameterized type like
Iterable<String>
,ArrayList<Integer>
, and so forth. - The type of the enumeration implements or extends a parameterized type like
Iterable<String>
,ArrayList<Integer>
, and so forth.
- The enumeration expression represents an invocation of a type member which return type is a parameterized type like
- Otherwise, the item type is
Object
.