/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

  1. namespace Rhino.Etl.Tests.Joins
  2. {
  3. using System.Collections.Generic;
  4. using Core;
  5. using Rhino.Etl.Core.Operations;
  6. public class AllStringsToUpperCase : AbstractOperation
  7. {
  8. public override IEnumerable<Row> Execute(IEnumerable<Row> rows)
  9. {
  10. foreach (Row row in rows)
  11. {
  12. foreach (string column in row.Columns)
  13. {
  14. string item = row[column] as string;
  15. if(item!=null)
  16. row[column] = item.ToUpper();
  17. }
  18. yield return row;
  19. }
  20. }
  21. }
  22. }