當前位置: 首頁>>代碼示例>>C#>>正文


C# CellProcessor類代碼示例

本文整理匯總了C#中CellProcessor的典型用法代碼示例。如果您正苦於以下問題:C# CellProcessor類的具體用法?C# CellProcessor怎麽用?C# CellProcessor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CellProcessor類屬於命名空間,在下文中一共展示了CellProcessor類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的CellProcessor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。