PageRenderTime 122ms CodeModel.GetById 81ms app.highlight 2ms RepoModel.GetById 38ms app.codeStats 0ms

/Rhino.Etl.Tests/Fibonacci/Output/OutputFibonacciToDatabase.cs

http://github.com/ayende/rhino-etl
C# | 30 lines | 24 code | 3 blank | 3 comment | 2 complexity | eebaee3b3a03b37ae0dbd6a33fefdfa3 MD5 | raw file
 1namespace Rhino.Etl.Tests.Fibonacci.Output
 2{
 3    using Core;
 4    using Errors;
 5
 6    public class OutputFibonacciToDatabase : EtlProcess
 7    {
 8        private readonly int max;
 9        private readonly Should should;
10        public readonly ThrowingOperation ThrowingOperation = new ThrowingOperation();
11        public readonly FibonacciOutput OutputOperation = new FibonacciOutput();
12
13        public OutputFibonacciToDatabase(int max, Should should)
14        {
15            this.max = max;
16            this.should = should;
17        }
18
19        /// <summary>
20        /// Initializes this instance.
21        /// </summary>
22        protected override void Initialize()
23        {
24            Register(new FibonacciOperation(max));
25            if (should == Should.Throw)
26                Register(ThrowingOperation);
27            Register(OutputOperation);
28        }
29    }
30}