private ICollection <string> ParseLine(string line, ImportProfile importProfile)
        {
            var columns = line.Split(importProfile.FieldDelimiter);

            if (importProfile.TextQualifier != 0)
            {
                return(columns
                       .Select(col => col.Trim(importProfile.TextQualifier))
                       .ToList());
            }

            return(columns);
        }
        private IDictionary <string, object> MapColumns(ICollection <string> columns, ImportProfile importProfile)
        {
            var row = new Dictionary <string, object>();

            for (int i = 0; i < columns.Count; i++)
            {
                var columnValue = columns.ElementAt(i);
                var map         = importProfile
                                  .RecordDefinitions.First()
                                  .FieldMappings
                                  .FirstOrDefault(m => m.FieldDefinitionNumber == (i + 1));

                if (map != null)
                {
                    row.Add(map.FieldName, columnValue);
                }
            }

            return(row);
        }