/Rhino.Etl.Core/IPipelineExecuter.cs

http://github.com/ayende/rhino-etl · C# · 49 lines · 19 code · 4 blank · 26 comment · 0 complexity · b8f5ef1f42224423f2da734cff47db7b MD5 · raw file

  1. namespace Rhino.Etl.Core
  2. {
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using Operations;
  7. /// <summary>
  8. /// Interface that abastract the actual execution of the pipeline
  9. /// </summary>
  10. public interface IPipelineExecuter
  11. {
  12. /// <summary>
  13. /// Executes the specified pipeline.
  14. /// </summary>
  15. /// <param name="pipelineName">The name.</param>
  16. /// <param name="pipeline">The pipeline.</param>
  17. /// <param name="translateRows">Translate the rows into another representation</param>
  18. void Execute(string pipelineName,
  19. ICollection<IOperation> pipeline,
  20. Func<IEnumerable<Row>, IEnumerable<Row>> translateRows);
  21. /// <summary>
  22. /// Transform the pipeline to an enumerable
  23. /// </summary>
  24. /// <param name="pipeline">The pipeline.</param>
  25. /// <param name="rows">The rows.</param>
  26. /// <param name="translateEnumerable">Translate the rows from one representation to another</param>
  27. /// <returns></returns>
  28. IEnumerable<Row> PipelineToEnumerable(
  29. ICollection<IOperation> pipeline,
  30. IEnumerable<Row> rows,
  31. Func<IEnumerable<Row>, IEnumerable<Row>> translateEnumerable);
  32. /// <summary>
  33. /// Gets all errors that occured under this executer
  34. /// </summary>
  35. /// <returns></returns>
  36. IEnumerable<Exception> GetAllErrors();
  37. /// <summary>
  38. /// Gets a value indicating whether this instance has errors.
  39. /// </summary>
  40. /// <value>
  41. /// <c>true</c> if this instance has errors; otherwise, <c>false</c>.
  42. /// </value>
  43. bool HasErrors { get; }
  44. }
  45. }