5 instantiations of DocumentationComment
Microsoft.CodeAnalysis.Workspaces (5)
Shared\Utilities\DocumentationComment.cs (5)
140return new DocumentationComment(xml) { HadXmlParseError = true }; 145=> _comment = new DocumentationComment(xml); 334return new DocumentationComment(text) { SummaryText = text }; 351return new DocumentationComment(text) { SummaryText = text }; 374public static readonly DocumentationComment Empty = new(string.Empty);
43 references to DocumentationComment
Microsoft.CodeAnalysis.CSharp.Features (1)
DocumentationComments\DocCommentConverter.cs (1)
83var docComment = DocumentationComment.FromXmlFragment(xmlFragment);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
MetadataAsSource\DocCommentFormatterTests.cs (1)
28var docComment = DocumentationComment.FromXmlFragment(docCommentXmlFragment);
Microsoft.CodeAnalysis.Features (1)
Shared\Extensions\ISymbolExtensions_2.cs (1)
188/// Returns the <see cref="DocumentationComment"/> for a symbol, even if it involves going to other symbols to find it.
Microsoft.CodeAnalysis.Workspaces (20)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentationCommentWrapper.cs (2)
9internal readonly struct VSTypeScriptDocumentationCommentWrapper(DocumentationComment underlyingObject) 12=> new(DocumentationComment.FromXmlFragment(xml));
Shared\Extensions\ISymbolExtensions.cs (7)
221public static DocumentationComment GetDocumentationComment(this ISymbol symbol, Compilation compilation, CultureInfo? preferredCulture = null, bool expandIncludes = false, bool expandInheritdoc = false, CancellationToken cancellationToken = default) 224private static DocumentationComment GetDocumentationComment(ISymbol symbol, HashSet<ISymbol>? visitedSymbols, Compilation compilation, CultureInfo? preferredCulture, bool expandIncludes, bool expandInheritdoc, CancellationToken cancellationToken) 237return DocumentationComment.Empty; 258return RoslynString.IsNullOrEmpty(xmlText) ? DocumentationComment.Empty : DocumentationComment.FromXmlFragment(xmlText); 386var inheritedDocumentation = GetDocumentationComment(symbol, visitedSymbols, compilation, preferredCulture: null, expandIncludes: true, expandInheritdoc: true, cancellationToken); 387if (inheritedDocumentation == DocumentationComment.Empty)
Shared\Utilities\DocumentationComment.cs (11)
93private static volatile DocumentationComment? s_cacheLastXmlFragmentParse; 96/// Parses and constructs a <see cref="DocumentationComment" /> from the given fragment of XML. 100public static DocumentationComment FromXmlFragment(string xml) 102var result = s_cacheLastXmlFragmentParse; 118private readonly DocumentationComment _comment; 125/// Parse and construct a <see cref="DocumentationComment" /> from the given fragment of XML. 129public static DocumentationComment Parse(string xml) 147private DocumentationComment ParseInternal(string xml) 329public DocumentationComment? GetParameter(string parameterName) 346public DocumentationComment? GetTypeParameter(string parameterName) 374public static readonly DocumentationComment Empty = new(string.Empty);
Microsoft.CodeAnalysis.Workspaces.UnitTests (20)
UtilityTest\DocumentationCommentTests.cs (20)
18var document = DocumentationComment.FromXmlFragment(""); 29var comment = DocumentationComment.FromXmlFragment( 55var comment = DocumentationComment.FromXmlFragment( 81var comment = DocumentationComment.FromXmlFragment("<summary>Summary 1</summary><summary>Summary 2</summary>"); 90var comment = DocumentationComment.FromXmlFragment(@"<summary> 101var comment = DocumentationComment.FromXmlFragment("<summary>goo"); 110var comment = DocumentationComment.FromXmlFragment( 123var comment = DocumentationComment.FromXmlFragment( 136var comment = DocumentationComment.FromXmlFragment( 149var comment = DocumentationComment.FromXmlFragment( 162var comment = DocumentationComment.FromXmlFragment( 175var comment = DocumentationComment.FromXmlFragment( 190var comment = DocumentationComment.FromXmlFragment( 202var comment = DocumentationComment.FromXmlFragment( 214var comment = DocumentationComment.FromXmlFragment( 234var comment = DocumentationComment.FromXmlFragment(@"<summary>This is a summary</summary>"); 242var comment = DocumentationComment.FromXmlFragment(@"<param/><typeparam/><exception/>"); 254var comments = DocumentationComment.FromXmlFragment(fragment); 294var comment = DocumentationComment.FromXmlFragment(fullXml); 341var comment = DocumentationComment.FromXmlFragment(fullXml);