public static IEnumerable <string> GetNameAttributeValues(DocumentationCommentTriviaSyntax comment, string localName) { foreach (XmlElementSyntax element in comment.Elements(localName)) { string name = GetNameAttributeValue(element); if (name != null) { yield return(name); } } }
public Dictionary <string, XmlElementSyntax> CreateNameElementMap(DocumentationCommentTriviaSyntax comment) { var dic = new Dictionary <string, XmlElementSyntax>(); foreach (XmlElementSyntax element in comment.Elements(ElementName, ElementNameUppercase)) { string name = DocumentationCommentRefactoring.GetAttributeValue(element, "name"); if (!dic.ContainsKey(name)) { dic.Add(name, element); } } return(dic); }