protected Block GetSummaryFor(ICommentSource comments, AssemblyDef assembly, CRefPath element) { Block constructorSummary = null; XmlCodeComment comment = comments.GetSummary(element); List <Block> constructorComments = Elements.Parser.Parse(assembly, comment); if (constructorComments != null && constructorComments.Count > 0) { constructorSummary = constructorComments.First(); } return(constructorSummary); }
/// <summary> /// Attempts to get the summary comment for the element and if that is not defined it will /// search for the value element instead. /// </summary> private Block GetXmlComments(FieldDef currentField, CRefPath crefPath) { Block summary = null; XmlCodeComment comment = _xmlComments.GetSummary(crefPath); if (comment == XmlCodeComment.Empty) { comment = _xmlComments.GetValue(crefPath); } List <Block> parsedBlocks = Parser.Parse(currentField.Assembly, comment); if (parsedBlocks != null && parsedBlocks.Count > 0) { summary = parsedBlocks[0]; } return(summary); }