当前位置: 首页>>代码示例>>C#>>正文


C# DefaultIntellisenseProvider.PerformResultInsertion方法代码示例

本文整理汇总了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");
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:DefaultIntellisenseProviderTest.cs

示例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);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:16,代码来源:DefaultIntellisenseProviderTest.cs

示例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);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs

示例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);
        }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:15,代码来源:DefaultIntellisenseProviderTest.cs

示例5: DefaultIntellisenseProvider_PerformResultInsertion_ContextIsNull_ThrowsException

 public void DefaultIntellisenseProvider_PerformResultInsertion_ContextIsNull_ThrowsException()
 {
     //------------Setup for test--------------------------
     var provider = new DefaultIntellisenseProvider();
     //------------Execute Test---------------------------
     provider.PerformResultInsertion("", null);
 }
开发者ID:NatashaSchutte,项目名称:Warewolf-ESB,代码行数:7,代码来源:DefaultIntellisenseProviderTest.cs


注:本文中的DefaultIntellisenseProvider.PerformResultInsertion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。