ConstraintExpression.Matches 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Matches(Constraint) |
返回作为参数提供的约束 - 用于允许自定义自定义约束轻松参与语法。 |
Matches(String) |
如果实际值与作为参数提供的正则表达式模式匹配,则返回成功的约束。 |
Matches<T>(Predicate<T>) |
返回作为参数提供的约束 - 用于允许自定义自定义约束轻松参与语法。 |
Matches(Constraint)
返回作为参数提供的约束 - 用于允许自定义自定义约束轻松参与语法。
public NUnit.Framework.Constraints.Constraint Matches (NUnit.Framework.Constraints.Constraint constraint);
member this.Matches : NUnit.Framework.Constraints.Constraint -> NUnit.Framework.Constraints.Constraint
参数
- constraint
- Constraint
返回
适用于
Matches(String)
如果实际值与作为参数提供的正则表达式模式匹配,则返回成功的约束。
public NUnit.Framework.Constraints.RegexConstraint Matches (string pattern);
member this.Matches : string -> NUnit.Framework.Constraints.RegexConstraint
参数
- pattern
- String
返回
适用于
Matches<T>(Predicate<T>)
返回作为参数提供的约束 - 用于允许自定义自定义约束轻松参与语法。
public NUnit.Framework.Constraints.Constraint Matches<T> (Predicate<T> predicate);
member this.Matches : Predicate<'T> -> NUnit.Framework.Constraints.Constraint
类型参数
- T
参数
- predicate
- Predicate<T>