static bool IsNestedType(TypeMember type) { switch (type.ParentNode.NodeType) { case NodeType.ClassDefinition: case NodeType.InterfaceDefinition: return true; } return false; }