本文整理汇总了C#中DefaultIntellisenseProvider.PerformResultInsertion方法的典型用法代码示例。如果您正苦于以下问题:C# DefaultIntellisenseProvider.PerformResultInsertion方法的具体用法?C# DefaultIntellisenseProvider.PerformResultInsertion怎么用?C# DefaultIntellisenseProvider.PerformResultInsertion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DefaultIntellisenseProvider
的用法示例。
在下文中一共展示了DefaultIntellisenseProvider.PerformResultInsertion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PerformResultInsertionWithRecordsetAfterScalarExpectedCompleteResult
public void PerformResultInsertionWithRecordsetAfterScalarExpectedCompleteResult()
{
const string currentText = "[[index1]][[rec";
DefaultIntellisenseProvider defaultIntellisenseProvider = new DefaultIntellisenseProvider();
IntellisenseProviderContext intellisenseProviderContext = new IntellisenseProviderContext
{
CaretPosition = currentText.Length,
InputText = currentText,
DesiredResultSet = IntellisenseDesiredResultSet.Default,
State = true
};
const string exprected = "[[index1]][[rec().field]]";
string actual = defaultIntellisenseProvider.PerformResultInsertion("[[rec().field]]", intellisenseProviderContext);
Assert.AreEqual(exprected, actual, "Inserting a recordset after a scalar from intellisense results performs an incorrect insertion");
}
示例2: PerformResultInsertionWithPartialRecordsetExpectedResultInsertsText
public void PerformResultInsertionWithPartialRecordsetExpectedResultInsertsText()
{
DefaultIntellisenseProvider defaultIntellisenseProvider = new DefaultIntellisenseProvider();
IntellisenseProviderContext intellisenseProviderContext = new IntellisenseProviderContext
{
CaretPosition = 4,
InputText = "City",
DesiredResultSet = IntellisenseDesiredResultSet.Default,
State = true
};
const string exprected = "[[City()]]";
string actual = defaultIntellisenseProvider.PerformResultInsertion("[[City()]]", intellisenseProviderContext);
Assert.AreEqual(exprected, actual);
}
示例3: PerformResultInsertionWithPartialScalarAndFullRegionExpectedResultInsertsText
public void PerformResultInsertionWithPartialScalarAndFullRegionExpectedResultInsertsText()
{
DefaultIntellisenseProvider defaultIntellisenseProvider = new DefaultIntellisenseProvider();
IntellisenseProviderContext intellisenseProviderContext = new IntellisenseProviderContext
{
CaretPosition = 3,
InputText = "[[S]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
const string exprected = "[[Scalar]]";
string actual = defaultIntellisenseProvider.PerformResultInsertion("[[Scalar]]", intellisenseProviderContext);
Assert.AreEqual(exprected, actual);
}
示例4: DefaultIntellisenseProvider
public void PerformResultInsertionWithPartialRecordsetWithClosedBracketsAndFullRegionAnStarIndexExpectedResultInsertsText()
{
DefaultIntellisenseProvider defaultIntellisenseProvider = new DefaultIntellisenseProvider();
IntellisenseProviderContext intellisenseProviderContext = new IntellisenseProviderContext
{
CaretPosition = 10,
InputText = "[[City(*).]]",
DesiredResultSet = IntellisenseDesiredResultSet.ClosestMatch
};
const string exprected = "[[City(*).GeoLocation]]";
string actual = defaultIntellisenseProvider.PerformResultInsertion("[[City(*).GeoLocation]]", intellisenseProviderContext);
Assert.AreEqual(exprected, actual);
}
示例5: DefaultIntellisenseProvider_PerformResultInsertion_ContextIsNull_ThrowsException
public void DefaultIntellisenseProvider_PerformResultInsertion_ContextIsNull_ThrowsException()
{
//------------Setup for test--------------------------
var provider = new DefaultIntellisenseProvider();
//------------Execute Test---------------------------
provider.PerformResultInsertion("", null);
}