Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 3
0
 public LookupExistsAnalyzer(ColumnMappingCollection keys)
 {
     Keys = keys;
 }
Ejemplo n.º 4
0
 public ReferenceAnalyzer(ColumnMappingCollection settings)
 {
     this.settings = settings;
 }
Ejemplo n.º 5
0
 public LookupExistsAnalyzer(ColumnMappingCollection settings)
 {
     this.settings = settings;
 }
Ejemplo n.º 6
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values, IDictionary <IColumnIdentifier, Tolerance> tolerances)
     : base(keys)
 {
     Values     = values;
     Tolerances = tolerances ?? new Dictionary <IColumnIdentifier, Tolerance>();
 }
Ejemplo n.º 7
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values)
     : this(keys, values, null)
 {
 }
Ejemplo n.º 8
0
 public LookupMatchesAnalyzer(ColumnMappingCollection keys, ColumnMappingCollection values)
     : base(keys)
 {
     Values = values;
 }