/Rhino.Etl.Tests/UsingDAL/ReadUsersFromFile.cs
http://github.com/ayende/rhino-etl · C# · 21 lines · 20 code · 1 blank · 0 comment · 0 complexity · 0b304e105f00c02b55ab5857e0b188b4 MD5 · raw file
- namespace Rhino.Etl.Tests.UsingDAL
- {
- using System.Collections.Generic;
- using Core;
- using Rhino.Etl.Core.Files;
- using Rhino.Etl.Core.Operations;
- public class ReadUsersFromFile : AbstractOperation
- {
- public override IEnumerable<Row> Execute(IEnumerable<Row> rows)
- {
- using(FileEngine file = FluentFile.For<UserRecord>().From("users.txt"))
- {
- foreach (object obj in file)
- {
- yield return Row.FromObject(obj);
- }
- }
- }
- }
- }