本文整理汇总了C#中Sequence.Exists方法的典型用法代码示例。如果您正苦于以下问题:C# Sequence.Exists方法的具体用法?C# Sequence.Exists怎么用?C# Sequence.Exists使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sequence
的用法示例。
在下文中一共展示了Sequence.Exists方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestSuiteStepper
/// <summary>
/// Constructs a model stepper for a given test suite and a given model program,
/// using the product of the test suite and the model program.
/// </summary>
/// <param name="startTest">name of start action of a test case</param>
/// <param name="testsuite">given test suite as a nonempty sequence of test cases</param>
/// <param name="mp">given model program</param>
public TestSuiteStepper(string startTest, Sequence<Sequence<CompoundTerm>> testsuite, ModelProgram mp)
: base(CreateModelProgram(startTest, testsuite, mp))
{
if (testsuite == null ||
testsuite.IsEmpty ||
testsuite.Exists(delegate(Sequence<CompoundTerm> testcase)
{
return (testcase == null || testcase.IsEmpty);
}))
throw new ConformanceTesterException("Invalid test suite, the test suite must be a nonempty sequence of nonempty action sequences.");
this.currentTest = testsuite.Head.AddFirst((CompoundTerm)Term.Parse(startTest + "(" + 0 + ")"));
this.testsuite = testsuite.Tail;
this.currentTestInProgress = false;
this.testnr = 1;
this.startTest = startTest;
}