private void InitializeStructuredDocumentation(IHasStructuredDocumentation item, SyntaxNode syntaxNode, IDom parent, SemanticModel model, OutputContext context) { if (item == null) { return; } var structuredDocumentation = GetStructuredDocumenation(syntaxNode, item, model, context).FirstOrDefault(); if (structuredDocumentation != null) { item.StructuredDocumentation = structuredDocumentation; var summaryElement = structuredDocumentation .Elements .Where(x => x.Name == "summary") .FirstOrDefault(); if (summaryElement != null) { var description = summaryElement.Text; if (!string.IsNullOrEmpty(description)) { item.Description = description; } } } }
public static IEnumerable <SyntaxTrivia> BuildStructuredDocumentationSyntax(IHasStructuredDocumentation itemAsT, OutputContext context) { if (itemAsT == null) { return(new List <SyntaxTrivia>()); } var factory = context.Corporation.GetTriviaFactory <IStructuredDocumentation>(); return(factory.BuildSyntaxTrivia(itemAsT.StructuredDocumentation, context)); }
private void InitializeStructuredDocumentation(IHasStructuredDocumentation item, SyntaxNode syntaxNode, IDom parent, SemanticModel model, OutputContext context) { if (item == null) { return; } var structuredDocumentation = GetStructuredDocumenation(syntaxNode, item, model, context).FirstOrDefault(); if (structuredDocumentation != null) { item.StructuredDocumentation = structuredDocumentation; item.Description = structuredDocumentation.Description; } }