private static void ProcessNodeMembers(TreeTextSpan.Builder builder, SyntaxList <MemberDeclarationSyntax> members) { foreach (var namespaceDeclaration in members.OfType <NamespaceDeclarationSyntax>()) { var childBuilder = builder.AddChild(namespaceDeclaration.FullSpan.Start); childBuilder.SetEnd(namespaceDeclaration.FullSpan.End); ProcessNodeMembers(childBuilder, namespaceDeclaration.Members); } }
private static void ProcessNodeMembers(TreeTextSpan.Builder builder, SyntaxList <MemberDeclarationSyntax> members) { foreach (var namespaceDeclaration in members.Where(member => BaseNamespaceDeclarationSyntaxWrapper.IsInstance(member))) { var childBuilder = builder.AddChild(namespaceDeclaration.FullSpan.Start); childBuilder.SetEnd(namespaceDeclaration.FullSpan.End); ProcessNodeMembers(childBuilder, ((BaseNamespaceDeclarationSyntaxWrapper)namespaceDeclaration).Members); } }