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


C# QueryString.Equals方法代码示例

本文整理汇总了C#中QueryString.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# QueryString.Equals方法的具体用法?C# QueryString.Equals怎么用?C# QueryString.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QueryString的用法示例。


在下文中一共展示了QueryString.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssertEqual

        private static void AssertEqual(QueryString expected, QueryString actual)
        {
            Assert.IsTrue(expected.Equals(actual), "Expected: " + expected + "\nActual: " + actual);

            Assert.IsTrue(expected.Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing actual, result changed.\n\nExpected: " + expected + "\nActual: " + QueryString.Parse(actual.ToString()));
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(actual), "After serializing and parsing expected, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + actual);
            Assert.IsTrue(QueryString.Parse(expected.ToString()).Equals(QueryString.Parse(actual.ToString())), "After serializing and parsing both, result changed.\n\nExpected: " + QueryString.Parse(expected.ToString()) + "\nActual: " + QueryString.Parse(actual.ToString()));
        }
开发者ID:WindowsNotifications,项目名称:QueryString.NET,代码行数:8,代码来源:QueryStringTest.cs

示例2: AssertNotEqual

        private static void AssertNotEqual(QueryString queryString1, QueryString queryString2)
        {
            Assert.IsFalse(queryString1.Equals(queryString2), "First: " + queryString1 + "\nSecond: " + queryString2);

            Assert.IsFalse(queryString1.Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing actual, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(queryString2), "After serializing and parsing expected, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
            Assert.IsFalse(QueryString.Parse(queryString1.ToString()).Equals(QueryString.Parse(queryString2.ToString())), "After serializing and parsing both, result changed.\n\nFirst: " + queryString1 + "\nSecond: " + queryString2);
        }
开发者ID:WindowsNotifications,项目名称:QueryString.NET,代码行数:8,代码来源:QueryStringTest.cs

示例3: AssertParse

        private static void AssertParse(QueryString expected, string inputQueryString)
        {
            Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString)), "Expected: " + expected + "\nActual: " + inputQueryString);

            if (inputQueryString != null)
                Assert.IsTrue(expected.Equals(QueryString.Parse(inputQueryString.Replace('&', ';'))), "Expected: " + expected + "\nActual: " + inputQueryString);
        }
开发者ID:WindowsNotifications,项目名称:QueryString.NET,代码行数:7,代码来源:QueryStringTest.cs


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