Ejemplo n.º 1
0
        private IDictionary <string, object> CreateMapFromRow(string[] row)
        {
            var map = new Dictionary <string, object>();

            var count = 0;

            try
            {
                foreach (var property in _propertyOrder)
                {
                    // Skip properties that are in the title row but not
                    // part of the map to send
                    if ((_propertyTypes != null) &&
                        (!_propertyTypes.ContainsKey(property)) &&
                        (!property.Equals(_adapterSpec.TimestampColumn)))
                    {
                        count++;
                        continue;
                    }

                    var value = Coercer.Coerce(property, row[count++]);
                    map.Put(property, value);
                }
            }
            catch (Exception e)
            {
                throw new EPException(e);
            }

            return(map);
        }