• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DefaultIntellisenseProvider类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DefaultKernel类代码示例发布时间:2022-05-24
下一篇:
C# DefaultDependencyResolver类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap