PageRenderTime 862ms CodeModel.GetById 668ms app.highlight 2ms RepoModel.GetById 191ms app.codeStats 0ms

/Rhino.Etl.Tests/Joins/ComplexUsersToPeopleJoinProcess.cs

http://github.com/ayende/rhino-etl
C# | 33 lines | 29 code | 4 blank | 0 comment | 0 complexity | c42286ca59774492dfdb6013212c1a74 MD5 | raw file
 1namespace Rhino.Etl.Tests.Joins
 2{
 3    using System.Collections.Generic;
 4    using Core;
 5
 6    public class ComplexUsersToPeopleJoinProcess : EtlProcess
 7    {
 8        private readonly IEnumerable<Row> left;
 9        private readonly IEnumerable<Row> right;
10
11        public List<Row> Results = new List<Row>();
12
13        public ComplexUsersToPeopleJoinProcess(IEnumerable<Row> left, IEnumerable<Row> right)
14        {
15            this.left = left;
16            this.right = right;
17        }
18
19        protected override void Initialize()
20        {
21            Register(
22                new RightJoinUsersToPeopleByEmail()
23                         .Left(Partial
24                                   .Register(new GenericEnumerableOperation(left))
25                                   .Register(new AllStringsToUpperCase()))
26                         .Right(Partial
27                                    .Register(new GenericEnumerableOperation(right))
28                                    .Register(new AllStringsToUpperCase()))
29            );
30            Register(new AddToResults(Results));
31        }
32    }
33}