The GetFields method is called multiple times during the lifetime of the QueryGroup. During the method call occur calculations. I saved the value of the calculation in a variable traversedQueryFields.
Also I changed the variable type of QueryFields and QueryGroups with IReadOnlyList, because variables are converted to a list in the constructor.
https://github.com/mikependon/RepoDB/blob/faa9d24a4889b6bdd397e99b138d9536d5c5011b/RepoDb/RepoDb/QueryGroup.cs#L236
This allows not to cast once again and use the Count property immediately.
The GetFields method is called multiple times during the lifetime of the QueryGroup. During the method call occur calculations. I saved the value of the calculation in a variable traversedQueryFields. Also I changed the variable type of QueryFields and QueryGroups with IReadOnlyList, because variables are converted to a list in the constructor. https://github.com/mikependon/RepoDB/blob/faa9d24a4889b6bdd397e99b138d9536d5c5011b/RepoDb/RepoDb/QueryGroup.cs#L236
This allows not to cast once again and use the Count property immediately.
before:
after: