private KeysRetriever BuildKeysRetriever(ColumnMappingCollection settings, Func <ColumnMapping, IColumnIdentifier> target)
        {
            var defColumns = new Collection <IColumnDefinition>();

            foreach (var setting in settings)
            {
                var defColumn = setting.ToColumnDefinition(() => target(setting));
                defColumns.Add(defColumn);
            }

            if (settings.Any(x => target(x) is ColumnOrdinalIdentifier))
            {
                return(new KeysRetrieverByOrdinal(defColumns));
            }
            else
            {
                return(new KeysRetrieverByName(defColumns));
            }
        }
Exemple #2
0
        private KeysRetriever BuildKeysRetriever(ColumnMappingCollection settings, Func <ColumnMapping, string> target)
        {
            var defColumns = new Collection <IColumnDefinition>();

            foreach (var setting in settings)
            {
                var defColumn = setting.ToColumnDefinition(() => target(setting));
                defColumns.Add(defColumn);
            }

            if (settings.Any(x => target(x).StartsWith("#")))
            {
                return(new KeysRetrieverByIndex(defColumns));
            }
            else
            {
                return(new KeysRetrieverByName(defColumns));
            }
        }
Exemple #3
0
 public LookupExistsAnalyzer(ColumnMappingCollection keys)
 {
     Keys = keys;
 }
Exemple #4
0
 public ReferenceAnalyzer(ColumnMappingCollection settings)
 {
     this.settings = settings;
 }
 public LookupExistsAnalyzer(ColumnMappingCollection settings)
 {
     this.settings = settings;
 }
Exemple #6
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values, IDictionary <IColumnIdentifier, Tolerance> tolerances)
     : base(keys)
 {
     Values     = values;
     Tolerances = tolerances ?? new Dictionary <IColumnIdentifier, Tolerance>();
 }
Exemple #7
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values)
     : this(keys, values, null)
 {
 }
Exemple #8
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values)
     : base(keys)
 {
     Values = values;
 }