コード例 #1
0
        public async Task <IPropertyBag> Should_Benchmark_IterateAllAsync_Over_All_Steps()
        {
            var subject = new StepIterator <IPropertyBag>(ctx);
            var x       = await subject.IterateAllAsync(this.serviceProvider, this.allSteps, null, CancellationToken.None);

            return(x);
        }
コード例 #2
0
ファイル: StepController.cs プロジェクト: jtabet/grid-machine
        public IActionResult Put([FromBody] int steps)
        {
            Grid     grid     = new Grid();
            Machine  machine  = new Machine(grid.GetCell(0, 0));
            Iterator iterator = new StepIterator(grid, machine, steps);
            Writer   writer   = new HtmlWriter();

            while (iterator.HasNext())
            {
                iterator.Next();
            }

            writer.Write(grid.ToList());

            return(StatusCode(201));
        }
コード例 #3
0
 public StepIteratorTest()
 {
     this.ctx     = new PropertyBag();
     this.steps   = CreateSteps();
     this.subject = new StepIterator <IPropertyBag>(ctx);
 }