本文整理汇总了C#中CellProcessor类的典型用法代码示例。如果您正苦于以下问题:C# CellProcessor类的具体用法?C# CellProcessor怎么用?C# CellProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CellProcessor类属于命名空间,在下文中一共展示了CellProcessor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ActualValues
public TypedValue[] ActualValues(CellProcessor processor, object theActualRow)
{
var actuals = (object[]) theActualRow;
var result = new TypedValue[actuals.Length];
for (int i = 0; i < actuals.Length; i++) result[i] = new TypedValue(actuals[i]);
return result;
}
开发者ID:vaibhavsapre,项目名称:fitsharp,代码行数:7,代码来源:UnnamedCollectionFixtureBase.cs
示例2: Evaluate
public static void Evaluate(this Tree<Cell> row, CellProcessor processor)
{
var interpreter = processor.CallStack.DomainAdapter.GetValueAs<FlowInterpreter>();
if (!row.InvokeSpecialAction(processor, interpreter).IsValid) {
row.ExecuteMethod(processor, interpreter);
}
}
开发者ID:jediwhale,项目名称:fitsharp,代码行数:7,代码来源:FlowRow.cs
示例3: ActualValues
public TypedValue[] ActualValues(CellProcessor processor, object theActualRow)
{
if (myColumnsUsed == null) myColumnsUsed = new bool[myHeaderRow.Parts.Size];
var result = new TypedValue[myHeaderRow.Parts.Size];
int column = 0;
foreach (Parse headerCell in new CellRange(myHeaderRow.Parts).Cells) {
TypedValue memberResult = new CellOperationImpl(processor).TryInvoke(theActualRow, headerCell);
if (memberResult.IsValid) {
result[column] = memberResult;
myColumnsUsed[column] = true;
}
else {
TypedValue itemResult = new CellOperationImpl(processor).TryInvoke(theActualRow,
new StringCellLeaf("getitem"),
new CellRange(headerCell, 1));
if (itemResult.IsValid) {
result[column] = itemResult;
myColumnsUsed[column] = true;
}
else {
result[column] = TypedValue.Void;
}
}
column++;
}
return result;
}
开发者ID:vaibhavsapre,项目名称:fitsharp,代码行数:27,代码来源:NamedMatchStrategy.cs
示例4: DoTable
public static void DoTable(Tree<Cell> table, Interpreter activeFixture, CellProcessor processor, bool inFlow)
{
var activeFlowFixture = activeFixture as FlowInterpreter;
if (activeFlowFixture != null) activeFlowFixture.DoSetUp(processor, table);
activeFixture.Interpret(processor, table);
if (activeFlowFixture != null && !inFlow) activeFlowFixture.DoTearDown(table);
}
开发者ID:blueroc2003,项目名称:fitsharp,代码行数:7,代码来源:ExecuteStoryTest.cs
示例5: 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>();
}
开发者ID:GibSral,项目名称:fitsharp,代码行数:7,代码来源:UseFixture.cs
示例6: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table)
{
new Traverse<Cell>()
.Rows.First(row => selectValue = new ValuePhrase(row).Evaluate(processor))
.Rows.All(row => SelectRow(processor, row))
.VisitTable(table);
}
开发者ID:andydavidsmith,项目名称:fitsharp,代码行数:7,代码来源:MatchValue.cs
示例7: SocketServer
public SocketServer(FitSocket socket, CellProcessor service, ProgressReporter reporter, bool suiteSetUpIsAnonymous)
{
this.service = service;
this.reporter = reporter;
this.socket = socket;
IMaybeProcessingSuiteSetup = suiteSetUpIsAnonymous;
}
开发者ID:skolima,项目名称:fitsharp,代码行数:7,代码来源:SocketServer.cs
示例8: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table)
{
new Traverse<Cell>()
.Rows.Header(row => headerRow = row)
.Rows.Rest(row => ComputeRow(processor, row))
.VisitTable(table);
}
开发者ID:JeffryGonzalez,项目名称:fitsharp,代码行数:7,代码来源:Compute.cs
示例9: 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);
}
开发者ID:GibSral,项目名称:fitsharp,代码行数:27,代码来源:MethodPhrase.cs
示例10: EvaluateNew
public object EvaluateNew(CellProcessor processor)
{
if (cells.Branches.Count < 2) throw MakeException("missing cells");
return processor.Create(
cells.ValueAt(1).Text,
cells.Skip(2))
.Value;
}
开发者ID:kpartusch,项目名称:fitsharp,代码行数:8,代码来源:MethodPhrase.cs
示例11: InvokeOperation
public InvokeOperation(CellProcessor processor, TypedValue target, Tree<Cell> member, Tree<Cell> parameters, Tree<Cell> cells)
{
this.processor = processor;
Target = target;
Member = member;
Parameters = parameters;
Cells = cells;
}
开发者ID:nhajratw,项目名称:fitsharp,代码行数:8,代码来源:InvokeOperation.cs
示例12: ExecuteMethod
public static TypedValue ExecuteMethod(this Tree<Cell> row, CellProcessor processor, MethodRowSelector selector,
object target)
{
return processor.Execute(target,
selector.SelectMethodCells(row),
selector.SelectParameterCells(row),
row.ValueAt(0));
}
开发者ID:jediwhale,项目名称:fitsharp,代码行数:8,代码来源:FlowRow.cs
示例13: Execute
static void Execute(CellProcessor processor, object facility, Tree<Cell> currentRow) {
var selector = new DoRowSelector();
var result = processor.ExecuteWithThrow(facility, selector.SelectMethodCells(currentRow),
selector.SelectParameterCells(currentRow),
currentRow.ValueAt(0));
if (result.IsVoid) return;
currentRow.ValueAt(0).SetAttribute(CellAttribute.Folded, result.ValueString);
}
开发者ID:GibSral,项目名称:fitsharp,代码行数:8,代码来源:ConfigureFixture.cs
示例14: RunTest
private void RunTest(CellProcessor service, string tables) {
var socket = new TestSocket();
socket.PutByteString(Protocol.FormatInteger(tables.Length));
socket.PutByteString(tables);
socket.PutByteString(Protocol.FormatInteger(0));
var server = new SocketServer(new FitSocket(socket, new NullReporter()), service, new NullReporter(), false);
server.ProcessTestDocuments(new StoryTestStringWriter(service).ForTables(s => resultTables += s));
Assert.IsFalse(socket.isOpen);
}
开发者ID:ChrisBDFA,项目名称:fitsharp,代码行数:9,代码来源:SocketServerTest.cs
示例15: DoInvoke
public TypedValue DoInvoke(CellProcessor processor)
{
var targetInstance = new TypedValue(target);
var targetObjectProvider = target as TargetObjectProvider;
var name = GetMemberName(processor);
return processor.Invoke(
targetObjectProvider != null ? new TypedValue(targetObjectProvider.GetTargetObject()) : targetInstance,
name, parameters);
}
开发者ID:nhajratw,项目名称:fitsharp,代码行数:9,代码来源:CellOperation.cs
示例16: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table) {
var action = new IncludeAction(processor);
var currentRow = table.Branches[0].Skip(1);
var selector = new SequenceRowSelector();
processor.ExecuteWithThrow(action, selector.SelectMethodCells(currentRow),
selector.SelectParameterCells(currentRow),
currentRow.ValueAt(0));
table.ValueAt(0, 0).SetAttribute(CellAttribute.Folded, action.Result);
}
开发者ID:GibSral,项目名称:fitsharp,代码行数:9,代码来源:Include.cs
示例17: SelectRow
void SelectRow(CellProcessor processor, Tree<Cell> row)
{
if (processor.Compare(new TypedValue(selectValue), row.Branches[0])) {
var interpreter = processor.CallStack.DomainAdapter.GetValueAs<FlowInterpreter>();
new FlowRow(new CellTree(row.Branches.Skip(1))).Evaluate(processor, interpreter);
}
else {
row.Value.SetAttribute(CellAttribute.Status, TestStatus.Ignore);
}
}
开发者ID:andydavidsmith,项目名称:fitsharp,代码行数:10,代码来源:MatchValue.cs
示例18: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table) {
var firstRow = table.Branches[0];
if (firstRow.Branches.Count < 2) throw new TableStructureException("Missing cells for use.");
var fixtureName = firstRow.ValueAt(1).Text;
var targetFixture = GetNamedFixture(processor, fixtureName)
?? MakeNewFixture(processor, firstRow);
targetFixture.Interpret(processor, table);
}
开发者ID:GibSral,项目名称:fitsharp,代码行数:10,代码来源:UseFixture.cs
示例19: Interpret
public void Interpret(CellProcessor processor, Tree<Cell> table)
{
processor.TestStatus.TableCount--;
TypedValue result = processor.Invoke(
new TypedValue(processor.Configuration.GetItem(table.Branches[0].Branches[1].Value.Text)),
table.Branches[0].Branches[2].Value.Text,
new CellTree());
result.ThrowExceptionIfNotValid();
if (result.IsVoid) return;
table.Branches[0].Branches[2].Value.SetAttribute(CellAttribute.Folded, result.ValueString);
}
开发者ID:skolima,项目名称:fitsharp,代码行数:11,代码来源:ConfigureFixture.cs
示例20: 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();
}
}
开发者ID:jediwhale,项目名称:fitsharp,代码行数:11,代码来源:Interpreter.cs
注:本文中的CellProcessor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论