當前位置: 首頁>>代碼示例>>C#>>正文


C# PostFilterRule.Equals方法代碼示例

本文整理匯總了C#中OpenTween.PostFilterRule.Equals方法的典型用法代碼示例。如果您正苦於以下問題:C# PostFilterRule.Equals方法的具體用法?C# PostFilterRule.Equals怎麽用?C# PostFilterRule.Equals使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenTween.PostFilterRule的用法示例。


在下文中一共展示了PostFilterRule.Equals方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Equals_HasNoMatchConditionsTest

        public void Equals_HasNoMatchConditionsTest()
        {
            var filter1 = new PostFilterRule
            {
                // マッチ條件
                FilterName = "",
                CaseSensitive = true,

                // 除外條件
                ExFilterName = "nameEx",
            };
            var filter2 = new PostFilterRule
            {
                FilterName = "",
                CaseSensitive = false,
                ExFilterName = "nameEx",
            };

            // マッチ條件 (≠除外條件) が無いので CaseSensitive 等の差異は無視する
            Assert.True(filter1.Equals(filter2));
            Assert.True(filter2.Equals(filter1));
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:22,代碼來源:PostFilterRuleTest.cs

示例2: Equals_HasNoExcludeConditionsTest

        public void Equals_HasNoExcludeConditionsTest()
        {
            var filter1 = new PostFilterRule
            {
                // マッチ條件
                FilterName = "name",

                // 除外條件
                ExFilterName = "",
                ExCaseSensitive = true,
            };
            var filter2 = new PostFilterRule
            {
                FilterName = "name",
                ExFilterName = "",
                ExCaseSensitive = false,
            };

            // 除外條件が無いので ExCaseSensitive 等の差異は無視する
            Assert.True(filter1.Equals(filter2));
            Assert.True(filter2.Equals(filter1));
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:22,代碼來源:PostFilterRuleTest.cs

示例3: Equals_Test

        public void Equals_Test()
        {
            var filter1 = new PostFilterRule
            {
                FilterName = "name",
                FilterBody = new[] { "body" },
                FilterSource = "source",
                ExFilterName = "nameEx",
                ExFilterBody = new[] { "bodyEx" },
                ExFilterSource = "sourceEx",
            };
            var filter2 = new PostFilterRule
            {
                FilterName = "name",
                FilterBody = new[] { "body" },
                FilterSource = "source",
                ExFilterName = "nameEx",
                ExFilterBody = new[] { "bodyEx" },
                ExFilterSource = "sourceEx",
            };

            Assert.True(filter1.Equals(filter2));
            Assert.True(filter2.Equals(filter1));
        }
開發者ID:urusupa,項目名稱:OpenTween,代碼行數:24,代碼來源:PostFilterRuleTest.cs


注:本文中的OpenTween.PostFilterRule.Equals方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。