提交 cc340e65 编写于 作者: C CyrusNajmabadi

Add documentation.

上级 097b26fc
......@@ -19,6 +19,10 @@ public DocumentDefinitionLocation(DocumentLocation location)
_location = location;
}
/// <summary>
/// Show the project that this <see cref="DocumentLocation"/> is contained in as the
/// Origination of this <see cref="DefinitionItem"/>.
/// </summary>
public override ImmutableArray<TaggedText> OriginationParts =>
ImmutableArray.Create(new TaggedText(TextTags.Text, _location.Document.Project.Name));
......
......@@ -49,6 +49,9 @@ internal static ImmutableArray<TaggedText> GetOriginationParts(ISymbol symbol)
{
// We don't show an origination location for a namespace because it can span over
// both metadata assemblies and source projects.
//
// Otherwise show the assembly this symbol came from as the Origination of
// the DefinitionItem.
if (symbol.Kind != SymbolKind.Namespace)
{
var assemblyName = symbol.ContainingAssembly?.ToDisplayString(SymbolDisplayFormat.MinimallyQualifiedFormat);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册