PageRenderTime 34ms CodeModel.GetById 29ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Rhino.Etl.Tests/Joins/AllStringsToUpperCase.cs

http://github.com/ayende/rhino-etl
C# | 23 lines | 22 code | 1 blank | 0 comment | 1 complexity | fb13b6b4e328ad49cadc6b26036fb5cb MD5 | raw file
 1namespace Rhino.Etl.Tests.Joins
 2{
 3    using System.Collections.Generic;
 4    using Core;
 5    using Rhino.Etl.Core.Operations;
 6
 7    public class AllStringsToUpperCase : AbstractOperation
 8    {
 9        public override IEnumerable<Row> Execute(IEnumerable<Row> rows)
10        {
11            foreach (Row row in rows)
12            {
13                foreach (string column in row.Columns)
14                {
15                    string item = row[column] as string;
16                    if(item!=null)
17                        row[column] = item.ToUpper();
18                }
19                yield return row;
20            }
21        }
22    }
23}