PageRenderTime 724ms CodeModel.GetById 400ms app.highlight 2ms RepoModel.GetById 126ms app.codeStats 70ms

/Rhino.Etl.Tests/Fibonacci/Batch/BatchFibonacci.cs

http://github.com/ayende/rhino-etl
C# | 44 lines | 37 code | 4 blank | 3 comment | 2 complexity | ec56f5035095a1b8af38dc38edec9329 MD5 | raw file
 1namespace Rhino.Etl.Tests.Fibonacci.Batch
 2{
 3    using Core;
 4    using Errors;
 5    using Output;
 6
 7    public class BatchFibonacci : EtlProcess
 8    {
 9        private readonly int max;
10        protected int Max
11        {
12            get
13            {
14                return max;
15            }
16        }
17
18        private readonly Should should;
19        protected Should Should
20        {
21            get
22            {
23                return should;
24            }
25        }
26
27        public BatchFibonacci(int max, Should should)
28        {
29            this.max = max;
30            this.should = should;
31        }
32
33        /// <summary>
34        /// Initializes this instance.
35        /// </summary>
36        protected override void Initialize()
37        {
38            Register(new FibonacciOperation(max));
39            if (should == Should.Throw)
40                Register(new ThrowingOperation());
41            Register(new BatchFibonacciToDatabase());
42        }
43    }
44}