本文整理汇总了C#中DefaultIntellisenseProvider.GetIntellisenseResults方法的典型用法代码示例。如果您正苦于以下问题:C# DefaultIntellisenseProvider.GetIntellisenseResults方法的具体用法?C# DefaultIntellisenseProvider.GetIntellisenseResults怎么用?C# DefaultIntellisenseProvider.GetIntellisenseResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DefaultIntellisenseProvider
的用法示例。
在下文中一共展示了DefaultIntellisenseProvider.GetIntellisenseResults方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IntellisenseTextBox
public void IntellisenseProvider_GetIntellisenseResults_RequestIsNotFromProviderTextBox_ProviderTextBoxIsSetToTheRequestTextBox()
{
//------------Setup for test--------------------------
var context = new IntellisenseProviderContext
{
CaretPosition = 7,
InputText = "city().",
DesiredResultSet = IntellisenseDesiredResultSet.Default,
FilterType = enIntellisensePartType.RecordsetFields,
TextBox = new IntellisenseTextBox(true)
};
var provider = new DefaultIntellisenseProvider();
var initialTextbox = provider.TextBox;
provider.GetIntellisenseResults(context);
Assert.AreEqual(null, initialTextbox);
Assert.AreEqual(context.TextBox, provider.TextBox);
}
示例2: DefaultIntellisenseProvider_GetIntellisenseResult_AfterDispose_ThrowsException
public void DefaultIntellisenseProvider_GetIntellisenseResult_AfterDispose_ThrowsException()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 5,
InputText = "[[num]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var provider = new DefaultIntellisenseProvider();
provider.Dispose();
provider.GetIntellisenseResults(context);
}
示例3: GetJsonIntellisenseResults
public static string GetJsonIntellisenseResults(string searchTerm, int caretPosition)
{
var provider = new DefaultIntellisenseProvider();
var context = new IntellisenseProviderContext { InputText = searchTerm, CaretPosition = caretPosition };
return "[" + string.Join(",", provider.GetIntellisenseResults(context).Where(c => !c.IsError).Select(r => string.Format("\"{0}\"", r.ToString()))) + "]";
}