protected virtual void PrepareType(Entity entity) {
            var builder = new DelimitedClassBuilder("Tfl" + entity.OutputName()) { IgnoreEmptyLines = true, Delimiter = _connection.Delimiter.ToString(CultureInfo.InvariantCulture), IgnoreFirstLines = 0 };

            foreach (var f in _fileFields) {
                var field = new DelimitedFieldBuilder(f.Identifier, f.SystemType);
                if (f.SimpleType.Equals("datetime")) {
                    field.Converter.Kind = ConverterKind.Date;
                    field.Converter.Arg1 = _connection.DateFormat;
                }
                if (f.SimpleType.Equals("guid")) {
                    field.Converter.TypeName = "Transformalize.Operations.Load.GuidConverter";
                }
                if (f.SimpleType.Equals("byte[]") || f.SimpleType.Equals("rowversion")) {
                    field.Converter.TypeName = "Transformalize.Operations.Load.ByteArrayConverter";
                }
                if (_isCsv) {
                    field.FieldQuoted = true;
                    field.QuoteChar = '"';
                    field.QuoteMode = QuoteMode.OptionalForBoth;
                    field.QuoteMultiline = MultilineMode.NotAllow;
                }
                builder.AddField(field);
            }
            Type = builder.CreateRecordClass();
        }
        internal static DelimitedClassBuilder LoadXmlInternal(XmlDocument document)
        {
            DelimitedClassBuilder res;
            var del = document.ChildNodes[0].Attributes[0].Value;

            var className = document.ChildNodes.Item(0).SelectNodes("/DelimitedClass/ClassName").Item(0).InnerText;

            res = new DelimitedClassBuilder(className, del);
//			
//			while(reader.mReader.EOF == false)
//			{
//				reader.ReadToNextElement();
////				if (reader.mReader.LocalName == "IgnoreEmptyLines")
//			}


            return res;
        }
        public override IEnumerable<Row> Execute(IEnumerable<Row> rows) {

            var cb = new DelimitedClassBuilder("Tfl" + _entity.OutputName()) {
                IgnoreEmptyLines = true,
                Delimiter = _delimiter.ToString(CultureInfo.InvariantCulture),
                IgnoreFirstLines = _ignoreFirstLines
            };

            foreach (var field in _fields) {
                if (field.IsQuoted()) {
                    cb.AddField(new DelimitedFieldBuilder(field.Identifier, typeof(string)) {
                        FieldQuoted = true,
                        QuoteChar = field.QuotedWith,
                        QuoteMode = QuoteMode.OptionalForRead,
                        FieldOptional = field.Optional
                    });
                } else {
                    cb.AddField(new DelimitedFieldBuilder(field.Identifier, typeof(string)) {
                        FieldOptional = field.Optional
                    });
                }
            }

            Logger.Info("Reading Delimited {0}", _name);

            var conversionMap = Common.GetObjectConversionMap();

            if (_top > 0) {
                using (var file = new FluentFile(cb.CreateRecordClass()).From(_fullName).OnError(_errorMode)) {
                    foreach (var row in from object obj in file select Row.FromObject(obj)) {
                        if (_counter == 0) {
                            try {
                                ProcessRow(row, _fields, _fullName, conversionMap);
                            } catch (Exception ex) {
                                if (!_warned) {
                                    Logger.EntityWarn(_entity.Alias, "First row from '{0}' failed to process.  You may have headers.  If so, set start=\"2\" on connection. Note: start is 1-based. {0}", _name, ex.Message);
                                    _warned = true;
                                }

                            }
                        } else {
                            ProcessRow(row, _fields, _fullName, conversionMap);
                        }
                        if (_counter < _top) {
                            yield return row;
                        } else {
                            yield break;
                        }
                    }
                    Interlocked.Increment(ref _counter);
                    HandleErrors(file);
                }
            } else {
                using (var file = new FluentFile(cb.CreateRecordClass()).From(_fullName).OnError(_errorMode)) {
                    foreach (var row in from object obj in file select Row.FromObject(obj)) {
                        if (_counter == 0) {
                            try {
                                ProcessRow(row, _fields, _fullName, conversionMap);
                            } catch (Exception ex) {
                                Logger.EntityWarn(_entity.Alias, "First row failed to process.  You may have headers.  If so, set start-index=\"2\" on connection. {0}", ex.Message);
                            }
                        } else {
                            ProcessRow(row, _fields, _fullName, conversionMap);
                        }
                        yield return row;
                        Interlocked.Increment(ref _counter);
                    }
                    HandleErrors(file);
                }
            }

        }
 protected override void PrepareType(Entity entity) {
     var builder = new DelimitedClassBuilder("Tfl" + entity.OutputName()) { IgnoreEmptyLines = true, Delimiter = " ", IgnoreFirstLines = 0 };
     builder.AddField(_htmlField, typeof(string));
     Type = builder.CreateRecordClass();
 }