本文整理汇总了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));
}