本文整理匯總了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));
}
示例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));
}
示例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));
}