本文整理汇总了C#中CompletionItem.AddProperty方法的典型用法代码示例。如果您正苦于以下问题:C# CompletionItem.AddProperty方法的具体用法?C# CompletionItem.AddProperty怎么用?C# CompletionItem.AddProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CompletionItem
的用法示例。
在下文中一共展示了CompletionItem.AddProperty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FixItem
private CompletionItem FixItem(CompletionItem item)
{
// remember provider so we can find it again later
item = item.AddProperty("Provider", this.Provider.Name);
item.Span = this.CompletionListSpan;
return item;
}
示例2: WithSupportedPlatforms
private static CompletionItem WithSupportedPlatforms(CompletionItem completionItem, SupportedPlatformData supportedPlatforms)
{
if (supportedPlatforms != null)
{
return completionItem
.AddProperty("InvalidProjects", string.Join(";", supportedPlatforms.InvalidProjects.Select(id => id.Id)))
.AddProperty("CandidateProjects", string.Join(";", supportedPlatforms.CandidateProjects.Select(id => id.Id)));
}
else
{
return completionItem;
}
}
示例3: FixItem
private CompletionItem FixItem(CompletionItem item)
{
// remember provider so we can find it again later
item = item.AddProperty("Provider", this.Provider.Name);
// assign the default span if not set by provider
if (item.Span == default(TextSpan) && this.DefaultItemSpan != default(TextSpan))
{
item = item.WithSpan(this.DefaultItemSpan);
}
return item;
}