/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

  1. namespace Rhino.Etl.Tests.Fibonacci.Output
  2. {
  3. using Core;
  4. using Errors;
  5. public class OutputFibonacciToDatabase : EtlProcess
  6. {
  7. private readonly int max;
  8. private readonly Should should;
  9. public readonly ThrowingOperation ThrowingOperation = new ThrowingOperation();
  10. public readonly FibonacciOutput OutputOperation = new FibonacciOutput();
  11. public OutputFibonacciToDatabase(int max, Should should)
  12. {
  13. this.max = max;
  14. this.should = should;
  15. }
  16. /// <summary>
  17. /// Initializes this instance.
  18. /// </summary>
  19. protected override void Initialize()
  20. {
  21. Register(new FibonacciOperation(max));
  22. if (should == Should.Throw)
  23. Register(ThrowingOperation);
  24. Register(OutputOperation);
  25. }
  26. }
  27. }