本文整理汇总了C#中CellProcessor.Get方法的典型用法代码示例。如果您正苦于以下问题:C# CellProcessor.Get方法的具体用法?C# CellProcessor.Get怎么用?C# CellProcessor.Get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CellProcessor
的用法示例。
在下文中一共展示了CellProcessor.Get方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Evaluate
public object Evaluate(DomainAdapter theFixture, CellProcessor processor) {
cells.ValueAt(0).SetAttribute(CellAttribute.Syntax, CellAttributeValue.SyntaxKeyword);
var cellCount = cells.Branches.Count;
if (cellCount < 2) throw MakeException("missing cells");
var identifier = cells.ValueAt(1).Text;
if (newIdentifier.Equals(identifier)) {
cells.ValueAt(1).SetAttribute(CellAttribute.Syntax, CellAttributeValue.SyntaxKeyword);
return new MethodPhrase(cells.Skip(1)).EvaluateNew(processor);
}
if (typeIdentifier.Equals(identifier)) {
cells.ValueAt(1).SetAttribute(CellAttribute.Syntax, CellAttributeValue.SyntaxKeyword);
if (cellCount < 3) throw MakeException("missing cells");
cells.ValueAt(2).SetAttribute(CellAttribute.Syntax, CellAttributeValue.SyntaxSUT);
return processor.ParseTree(typeof (Type), cells.Branches[2]).Value;
}
if (currentIdentifier.Equals(identifier)) {
cells.ValueAt(1).SetAttribute(CellAttribute.Syntax, CellAttributeValue.SyntaxKeyword);
return theFixture.SystemUnderTest;
}
var fixture = theFixture as FlowInterpreter;
if (fixture == null) throw MakeException("flow fixture required");
return processor.Get<Symbols>().HasValue(identifier)
? processor.Get<Symbols>().GetValue(identifier)
: fixture.ExecuteFlowRowMethod(processor, cells);
}
示例2: GetNamedFixture
static Interpreter GetNamedFixture(CellProcessor processor, string theName) {
if (!processor.Get<Symbols>().HasValue(theName)) return null;
var result = processor.Operate<WrapOperator>(new TypedValue(processor.Get<Symbols>().GetValue(theName)));
result.AsNot<Interpreter>(() => { throw new FitFailureException("Result is not a Fixture."); });
return result.GetValueAs<Interpreter>();
}
示例3: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table)
{
processor.TestStatus.TableCount--;
var name = processor.ParseTree<Cell, MemberName>(new EnumeratedTree<Cell>(table.Branches[0].Branches.Skip(1).Alternate()));
processor.Get<Procedures>().Save(name.ToString(), table);
}
示例4: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table)
{
processor.TestStatus.TableCount--;
processor.Get<Symbols>().Clear();
}