提交 027f4515 编写于 作者: C chandera

Preselect types and members based on the <completionlsit> documentation...

Preselect types and members based on the <completionlsit> documentation comment tag. (changeset 1261004)
上级 b93ab842
......@@ -11,6 +11,7 @@ internal static class DocumentationCommentXmlNames
{
public const string CElementName = "c";
public const string CodeElementName = "code";
public const string CompletionListElementName = "completionlist";
public const string ExampleElementName = "example";
public const string ExceptionElementName = "exception";
public const string IncludeElementName = "include";
......
......@@ -59,6 +59,12 @@ internal sealed class DocumentationComment
/// </summary>
public ImmutableArray<string> ExceptionTypes { get; private set; }
/// <summary>
/// The item named named in the %lt;completionlist&gt; tag's cref attribute.
/// Null if the tag or cref attribute didn't exist.
/// </summary>
public string CompletionListCref { get; private set; }
private DocumentationComment()
{
ParameterNames = ImmutableArray.Create<string>();
......@@ -148,6 +154,16 @@ public static DocumentationComment FromXmlFragment(string xml)
exceptionTextBuilders[type].Add(exceptionText);
}
}
else if (XmlNames.ElementEquals(localName, XmlNames.CompletionListElementName))
{
string cref = reader.GetAttribute(XmlNames.CrefAttributeName);
if (!string.IsNullOrWhiteSpace(cref))
{
comment.CompletionListCref = cref;
}
reader.ReadInnerXml();
}
else
{
// This is an element we don't handle. Skip it.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册