/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

  1. namespace Rhino.Etl.Tests.Fibonacci.Batch
  2. {
  3. using Core;
  4. using Errors;
  5. using Output;
  6. public class BatchFibonacci : EtlProcess
  7. {
  8. private readonly int max;
  9. protected int Max
  10. {
  11. get
  12. {
  13. return max;
  14. }
  15. }
  16. private readonly Should should;
  17. protected Should Should
  18. {
  19. get
  20. {
  21. return should;
  22. }
  23. }
  24. public BatchFibonacci(int max, Should should)
  25. {
  26. this.max = max;
  27. this.should = should;
  28. }
  29. /// <summary>
  30. /// Initializes this instance.
  31. /// </summary>
  32. protected override void Initialize()
  33. {
  34. Register(new FibonacciOperation(max));
  35. if (should == Should.Throw)
  36. Register(new ThrowingOperation());
  37. Register(new BatchFibonacciToDatabase());
  38. }
  39. }
  40. }