public static GetSourceDetail ( ISymbol symbol ) : |
||
symbol | ISymbol | |
Результат |
public override MetadataItem DefaultVisit(ISymbol symbol) { if (!FilterVisitor.CanVisitApi(symbol)) { return(null); } var item = new MetadataItem { Name = VisitorHelper.GetId(symbol), CommentId = VisitorHelper.GetCommentId(symbol), RawComment = symbol.GetDocumentationCommentXml(), Language = Language, }; item.DisplayNames = new SortedList <SyntaxLanguage, string>(); item.DisplayNamesWithType = new SortedList <SyntaxLanguage, string>(); item.DisplayQualifiedNames = new SortedList <SyntaxLanguage, string>(); item.Source = VisitorHelper.GetSourceDetail(symbol); var assemblyName = symbol.ContainingAssembly?.Name; item.AssemblyNameList = string.IsNullOrEmpty(assemblyName) ? null : new List <string> { assemblyName }; if (!(symbol is INamespaceSymbol)) { var namespaceName = VisitorHelper.GetId(symbol.ContainingNamespace); item.NamespaceName = string.IsNullOrEmpty(namespaceName) ? null : namespaceName; } VisitorHelper.FeedComments(item, GetTripleSlashCommentParserContext(item, _preserveRawInlineComments)); if (item.Exceptions != null) { foreach (var exceptions in item.Exceptions) { AddReference(exceptions.Type, exceptions.CommentId); } } if (item.Sees != null) { foreach (var i in item.Sees.Where(l => l.LinkType == LinkType.CRef)) { AddReference(i.LinkId, i.CommentId); } } if (item.SeeAlsos != null) { foreach (var i in item.SeeAlsos.Where(l => l.LinkType == LinkType.CRef)) { AddReference(i.LinkId, i.CommentId); } } _generator.DefaultVisit(symbol, item, this); return(item); }