src/Shared/EntityFramework/Core/Query/InternalTrees/NodeCounter.cs
// <summary>
// Common processing for all node types
// Count = 1 (self) + count of children
// </summary>
Common processing for all node types
Count = 1 (self) + count of children
Common processing for all node types Count = 1 ( self ) + count of children
protected override int VisitDefault(Node n)
        {
            var count = 1;
            foreach (var child in n.Children)
            {
                count += VisitNode(child);
            }
            return count;
        }
protected override int VisitDefault ( Node n ) { var count = 1 ; foreach ( var child in n . Children ) { count += VisitNode ( child ) ; } return count ; }
Common processing for all node types
Count = 1 (self) + count of children
Common processing for all node types Count = 1 ( self ) + count of children
n
Node