/Rhino.Etl.Tests/Fibonacci/Bulk/BulkInsertFibonacciToDatabase.cs

http://github.com/ayende/rhino-etl · C# · 29 lines · 23 code · 3 blank · 3 comment · 2 complexity · c1585baab4a8e8119b29022f55756eb9 MD5 · raw file

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