public Factory ToFactory(IEnumerable<Column> columns, TypeMapper typeMapper) { if (columns.Count() != _attributes.Count()) { throw new InvalidOperationException("Did not get equal number of Columns and Attributes"); } var readers = columns.Zip<Column, Attribute, Func<object[], object>>(_attributes, (column, attribute) => { var mapper = typeMapper.MappingFor(column, attribute); return (row) => mapper(column.Read(row)); }); return new Factory(_info, readers.ToArray()); }