本文整理汇总了C#中Tree.Skip方法的典型用法代码示例。如果您正苦于以下问题:C# Tree.Skip方法的具体用法?C# Tree.Skip怎么用?C# Tree.Skip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tree
的用法示例。
在下文中一共展示了Tree.Skip方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeNewFixture
static Interpreter MakeNewFixture(CellProcessor processor, Tree<Cell> firstRow) {
var fixture = processor.ParseTree<Cell, Interpreter>(firstRow.Skip(1));
if (firstRow.Branches.Count > 2) {
var adapter = fixture as MutableDomainAdapter;
if (adapter != null) {
var parent = processor.CallStack.DomainAdapter.GetValueAs<DomainAdapter>();
adapter.SetSystemUnderTest(new MethodPhrase(firstRow.Skip(2)).Evaluate(parent, processor));
}
}
return fixture;
}
示例2: GetMethodCellRange
static Tree<Cell> GetMethodCellRange(Tree<Cell> row , int excludedCellCount)
{
if (row.Branches.Count < 2) {
throw new FitFailureException("Missing cells for embedded method");
}
return row.Skip(1).Take(row.Branches.Count -excludedCellCount - 1);
}
示例3: ExecuteFlowRowMethod
public static object ExecuteFlowRowMethod(this FlowInterpreter interpreter, CellProcessor processor, Tree<Cell> row)
{
try {
var cells = row.Skip(1);
return cells.ExecuteMethod(processor, interpreter).ThrowExceptionIfNotValid().Value;
}
catch (ParseException<Cell> e) {
processor.TestStatus.MarkException(e.Subject, e.InnerException);
throw new IgnoredException();
}
}
示例4: ExecuteFlowRowMethod
public static object ExecuteFlowRowMethod(this FlowInterpreter interpreter, CellProcessor processor, Tree<Cell> row) {
try {
var cells = row.Skip(1);
return
processor.ExecuteWithThrow(interpreter,
interpreter.MethodRowSelector.SelectMethodCells(cells),
interpreter.MethodRowSelector.SelectParameterCells(cells),
row.ValueAt(1)).
Value;
}
catch (ParseException<Cell> e) {
processor.TestStatus.MarkException(e.Subject, e.InnerException);
throw new IgnoredException();
}
}
示例5: ShowAs
TypedValue ShowAs(FlowInterpreter interpreter, Tree<Cell> row)
{
try {
var restOfRow = row.Skip(1);
var attributes = GetAttributes(Processor.Parse<Cell, string>(row.Branches[1].Value));
var value = interpreter.ExecuteFlowRowMethod(Processor, restOfRow);
AddCell(row, new ComposeShowAsOperator(attributes, value));
}
catch (IgnoredException) {}
return TypedValue.Void;
}
示例6: Name
TypedValue Name(FlowInterpreter interpreter, Tree<Cell> row)
{
if (row.Branches.Count < 3) {
throw new TableStructureException("missing cells for name.");
}
var namedValue = withIdentifier.Equals(row.Branches[2].Value.Text)
? new MethodPhrase(row.Skip(2)).Evaluate(interpreter, Processor)
: interpreter.ExecuteFlowRowMethod(Processor, row.Skip(1));
Processor.Get<Symbols>().Save(row.Branches[1].Value.Text, namedValue);
Processor.TestStatus.MarkRight(row.Branches[1].Value);
return TypedValue.Void;
}