本文整理汇总了C#中DefaultIntellisenseProvider类的典型用法代码示例。如果您正苦于以下问题:C# DefaultIntellisenseProvider类的具体用法?C# DefaultIntellisenseProvider怎么用?C# DefaultIntellisenseProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultIntellisenseProvider类属于命名空间,在下文中一共展示了DefaultIntellisenseProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DefaultIntellisenseProvider_Dispose_IsDisposedIsSetToTrue
public void DefaultIntellisenseProvider_Dispose_IsDisposedIsSetToTrue()
{
var provider = new DefaultIntellisenseProvider();
var isDiposedAferConstruction = provider.IsDisposed;
provider.Dispose();
Assert.IsFalse(isDiposedAferConstruction);
Assert.IsTrue(provider.IsDisposed);
Assert.IsFalse(provider.Optional);
Assert.AreEqual(null, provider.CachedDataList);
}
开发者ID:Robin--,项目名称:Warewolf,代码行数:10,代码来源:DefaultIntellisenseProviderTest.cs
示例2: DefaultIntellisenseProvider_Construct_DefaultPropertiesAreSet
public void DefaultIntellisenseProvider_Construct_DefaultPropertiesAreSet()
{
var provider = new DefaultIntellisenseProvider();
Assert.IsTrue(provider.HandlesResultInsertion);
Assert.AreEqual(IntellisenseProviderType.Default, provider.IntellisenseProviderType);
Assert.IsFalse(provider.Optional);
Assert.IsFalse(provider.IsDisposed);
Assert.IsFalse(provider.IsUpdated);
Assert.AreEqual(string.Empty, provider.FilterCondition);
}
开发者ID:Robin--,项目名称:Warewolf,代码行数:11,代码来源:DefaultIntellisenseProviderTest.cs
示例3: GetIntellisenseResultsWithOpenRegionAndInRecSetIndexAndWithFieldExpectedAllResults
public void GetIntellisenseResultsWithOpenRegionAndInRecSetIndexAndWithFieldExpectedAllResults()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 9,
InputText = "[[City([[).Name]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(9, getResults.Count);
Assert.AreEqual("[[Scalar]]", getResults[0].ToString());
Assert.AreEqual("[[Country]]", getResults[1].ToString());
Assert.AreEqual("[[State]]", getResults[2].ToString());
Assert.AreEqual("[[City(", getResults[3].ToString());
Assert.AreEqual("[[City().Name]]", getResults[4].ToString());
Assert.AreEqual("[[City(*).Name]]", getResults[5].ToString());
Assert.AreEqual("[[City().GeoLocation]]", getResults[6].ToString());
Assert.AreEqual("[[City(*).GeoLocation]]", getResults[7].ToString());
Assert.AreEqual("Invalid Expression", getResults[8].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:22,代码来源:DefaultIntellisenseProviderTest.cs
示例4: GetIntellisenseResultsWithInRecSetIndexAndWithFieldAndWithClosingSquareBraceExpectedNoResults
public void GetIntellisenseResultsWithInRecSetIndexAndWithFieldAndWithClosingSquareBraceExpectedNoResults()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 13,
InputText = "[[City([[sca]).Name]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual("Invalid expression: Opening and closing brackets dont match.", getResults[0].Description);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:13,代码来源:DefaultIntellisenseProviderTest.cs
示例5: GetIntellisenseResultsWhereCarretPositionLessThanZeroExpectedNoResultsAndException
public void GetIntellisenseResultsWhereCarretPositionLessThanZeroExpectedNoResultsAndException()
{
var context = new IntellisenseProviderContext
{
CaretPosition = -1,
InputText = "Sum([[Scalar]],",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(0, getResults.Count);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:11,代码来源:DefaultIntellisenseProviderTest.cs
示例6: GetIntellisenseResultsWhereCommaEnteredForInfragisticsFunctonExpectedNoResultsAndException
public void GetIntellisenseResultsWhereCommaEnteredForInfragisticsFunctonExpectedNoResultsAndException()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 15,
InputText = "Sum([[Scalar]],",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(0, getResults.Count);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:13,代码来源:DefaultIntellisenseProviderTest.cs
示例7: GetIntellisenseResultsWithSumAndAfterCommaAndBeforeBraceExpectedAllVarsInResults
public void GetIntellisenseResultsWithSumAndAfterCommaAndBeforeBraceExpectedAllVarsInResults()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 17,
InputText = "Sum([[Scalar]],[[)",
DesiredResultSet = IntellisenseDesiredResultSet.EntireSet
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(9, getResults.Count);
Assert.AreEqual("[[Scalar]]", getResults[0].ToString());
Assert.AreEqual("[[Country]]", getResults[1].ToString());
Assert.AreEqual("[[State]]", getResults[2].ToString());
Assert.AreEqual("[[City(", getResults[3].ToString());
Assert.AreEqual("[[City().Name]]", getResults[4].ToString());
Assert.AreEqual("[[City(*).Name]]", getResults[5].ToString());
Assert.AreEqual("[[City().GeoLocation]]", getResults[6].ToString());
Assert.AreEqual("[[City(*).GeoLocation]]", getResults[7].ToString());
Assert.AreEqual("Invalid Expression", getResults[8].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:22,代码来源:DefaultIntellisenseProviderTest.cs
示例8: GetIntellisenseResultsWithCommaSeperatedRegionsAndNumberIndexExpectedNoResults
public void GetIntellisenseResultsWithCommaSeperatedRegionsAndNumberIndexExpectedNoResults()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 19,
InputText = "[[Scalar]],[[City(5).Name]],[[Country]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(0, getResults.Count);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:13,代码来源:DefaultIntellisenseProviderTest.cs
示例9: 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");
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:DefaultIntellisenseProviderTest.cs
示例10: 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);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:DefaultIntellisenseProviderTest.cs
示例11: 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);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs
示例12: 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);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs
示例13: PerformResultInsertion_With_PartialScalar_AndRegion_AndWithinPluses_Expected_ResultInsertsText
// ReSharper disable InconsistentNaming
public void PerformResultInsertion_With_PartialScalar_AndRegion_AndWithinPluses_Expected_ResultInsertsText()
// ReSharper restore InconsistentNaming
{
var context = new IntellisenseProviderContext
{
CaretPosition = 32,
InputText = "[[recset().field]]+[[Scalar]]+[[+[[fail]]",
DesiredResultSet = 0
};
var actual = new DefaultIntellisenseProvider().PerformResultInsertion("[[Car]]", context);
Assert.AreEqual("[[recset().field]]+[[Scalar]]+[[Car]]+[[fail]]", actual);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:14,代码来源:DefaultIntellisenseProviderTest.cs
示例14: PerformResultInsertion_With_PartialScalar_AndRegion_AtDeepWithinExtaIndex_Expected_ResultInsertsText
// ReSharper disable InconsistentNaming
public void PerformResultInsertion_With_PartialScalar_AndRegion_AtDeepWithinExtaIndex_Expected_ResultInsertsText()
// ReSharper restore InconsistentNaming
{
var context = new IntellisenseProviderContext
{
CaretPosition = 23,
InputText = "[[recset([[recset([[sca).field]]).field]]",
DesiredResultSet = 0,
State = true
};
var performResultInsertion = new DefaultIntellisenseProvider().PerformResultInsertion("[[scalar]]", context);
Assert.AreEqual("[[recset([[recset([[scalar]]).field]]).field]]", performResultInsertion);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs
示例15: PerformResultInsertion_With_PartialRecset_AndRegion_Expected_ResultInsertsText
// ReSharper disable InconsistentNaming
public void PerformResultInsertion_With_PartialRecset_AndRegion_Expected_ResultInsertsText()
// ReSharper restore InconsistentNaming
{
var context = new IntellisenseProviderContext
{
CaretPosition = 14,
InputText = "[[recset([[ano).field]]",
DesiredResultSet = 0,
State = true
};
var actual = new DefaultIntellisenseProvider().PerformResultInsertion("[[anotherRecset().newfield]]", context);
Assert.AreEqual("[[recset([[anotherRecset().newfield]]).field]]", actual);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs
示例16: GetIntellisenseResultsWithOpenRegionAndAfterNumberIndexAndWithPartialFieldExpectedScalarVarInResults
public void GetIntellisenseResultsWithOpenRegionAndAfterNumberIndexAndWithPartialFieldExpectedScalarVarInResults()
{
var context = new IntellisenseProviderContext
{
CaretPosition = 12,
InputText = "[[City(6).Na",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(2, getResults.Count);
Assert.AreEqual("[[City().Name]]", getResults[0].ToString());
Assert.AreEqual("Invalid Expression", getResults[1].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs
示例17: GetIntellisenseResults_With_OpenRegion_AndInRecSetIndex_AndWithField_Expected_RecSetVarInResults
// ReSharper disable InconsistentNaming
public void GetIntellisenseResults_With_OpenRegion_AndInRecSetIndex_AndWithField_Expected_RecSetVarInResults()
// ReSharper restore InconsistentNaming
{
var context = new IntellisenseProviderContext
{
CaretPosition = 12,
InputText = "[[City([[Cit).Name]]",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(6, getResults.Count);
Assert.AreEqual("[[City(", getResults[0].ToString());
Assert.AreEqual("[[City().Name]]", getResults[1].ToString());
Assert.AreEqual("[[City(*).Name]]", getResults[2].ToString());
Assert.AreEqual("[[City().GeoLocation]]", getResults[3].ToString());
Assert.AreEqual("[[City(*).GeoLocation]]", getResults[4].ToString());
Assert.AreEqual("Invalid Expression", getResults[5].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:22,代码来源:DefaultIntellisenseProviderTest.cs
示例18: 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);
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:18,代码来源:DefaultIntellisenseProviderTest.cs
示例19: GetIntellisenseResults_With_Sum_AndAfterComma_Expected_AllVarsInResults
// ReSharper disable InconsistentNaming
public void GetIntellisenseResults_With_Sum_AndAfterComma_Expected_AllVarsInResults()
// ReSharper restore InconsistentNaming
{
var context = new IntellisenseProviderContext
{
CaretPosition = 17,
InputText = "Sum([[Scalar]],[[",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
Assert.AreEqual(9, getResults.Count);
Assert.AreEqual("[[Scalar]]", getResults[0].ToString());
Assert.AreEqual("[[Country]]", getResults[1].ToString());
Assert.AreEqual("[[State]]", getResults[2].ToString());
Assert.AreEqual("[[City(", getResults[3].ToString());
Assert.AreEqual("[[City().Name]]", getResults[4].ToString());
Assert.AreEqual("[[City(*).Name]]", getResults[5].ToString());
Assert.AreEqual("[[City().GeoLocation]]", getResults[6].ToString());
Assert.AreEqual("[[City(*).GeoLocation]]", getResults[7].ToString());
Assert.AreEqual("Invalid Expression", getResults[8].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:23,代码来源:DefaultIntellisenseProviderTest.cs
示例20: IntellisenseProvider_GetIntellisenseResults_WhenNoOpeningBracketsAndOpenRecordset_ValidResults
public void IntellisenseProvider_GetIntellisenseResults_WhenNoOpeningBracketsAndOpenRecordset_ValidResults()
{
//------------Setup for test--------------------------
// vs Rs().
var context = new IntellisenseProviderContext
{
CaretPosition = 4,
InputText = "city(",
DesiredResultSet = IntellisenseDesiredResultSet.Default
};
//------------Execute Test---------------------------
var getResults = new DefaultIntellisenseProvider().GetIntellisenseResults(context);
//------------Assert Results-------------------------
Assert.AreEqual(5, getResults.Count);
Assert.AreEqual("[[City(", getResults[0].ToString());
Assert.AreEqual("[[City().Name]]", getResults[1].ToString());
Assert.AreEqual("[[City(*).Name]]", getResults[2].ToString());
Assert.AreEqual("[[City().GeoLocation]]", getResults[3].ToString());
Assert.AreEqual("[[City(*).GeoLocation]]", getResults[4].ToString());
}
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:23,代码来源:DefaultIntellisenseProviderTest.cs
注:本文中的DefaultIntellisenseProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论