PageRenderTime 303ms CodeModel.GetById 142ms app.highlight 2ms RepoModel.GetById 158ms app.codeStats 0ms

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