protected override void EnqueueChangeEvent(SyntaxNode node, SyntaxNode parent, CodeModelEventType eventType, CodeModelEventQueue eventQueue) { if (eventQueue == null) { return; } if (node is IncompleteMemberSyntax) { return; } if (node is BaseFieldDeclarationSyntax) { foreach (var variableDeclarator in ((BaseFieldDeclarationSyntax)node).Declaration.Variables) { eventQueue.EnqueueChangeEvent(variableDeclarator, parent, eventType); } } else if (node is AttributeListSyntax) { foreach (var attribute in ((AttributeListSyntax)node).Attributes) { ChangeEventQueueForAttributes(attribute, parent, eventType, eventQueue); } } else if (node is AttributeSyntax) { ChangeEventQueueForAttributes((AttributeSyntax)node, parent, eventType, eventQueue); } else { eventQueue.EnqueueChangeEvent(node, parent, eventType); } }
private static void ChangeEventQueueForAttributes(AttributeSyntax attribute, SyntaxNode parent, CodeModelEventType eventType, CodeModelEventQueue eventQueue) { if (parent is BaseFieldDeclarationSyntax) { foreach (var variableDeclarator in ((BaseFieldDeclarationSyntax)parent).Declaration.Variables) { eventQueue.EnqueueChangeEvent(attribute, variableDeclarator, eventType); } } else { eventQueue.EnqueueChangeEvent(attribute, parent, eventType); } }