/// <summary>
        /// Compares the columns.
        /// </summary>
        /// <param name="currentRow">The current row.</param>
        /// <param name="mapping">The mapping.</param>
        public void CompareColumns(int currentRow, CompareMappingModel mapping)
        {
            List <CompareResultModel> results = new List <CompareResultModel>();
            CompareParameters         parms   = new CompareParameters(mapping.Operator);
            DateTime startTime = DateTime.Now;

            parms.Add(
                Model.Source.TimeZoneOffset,
                Model.Target.TimeZoneOffset,
                mapping.ToDictionary(mapping.LeftLookupFile),
                mapping.ToDictionary(mapping.RightLookupFile), mapping.IgnoreChars);

            OnStatusEvent(mapping, currentRow, startTime);

            for (int row = 0; row < Table.Rows.Count; row++)
            {
                var left  = Convert.ToString(Table.Rows[row][mapping.LeftKey]);
                var right = Convert.ToString(Table.Rows[row][mapping.RightKey]);

                //if (string.IsNullOrEmpty(mapping.IgnoreChars) == false)
                //{
                //    mapping.IgnoreChars.ToList().ForEach(@char => right = right.Replace(@char.ToString(), ""));
                //    mapping.IgnoreChars.ToList().ForEach(@char => left = left.Replace(@char.ToString(), ""));
                //}


                if (comparer.ContainsKey(mapping.CompareType))
                {
                    StatusMessage = "Completed";
                    if (!comparer[mapping.CompareType](left, right, parms.Operator, parms))
                    {
                        var primary_key = Table.Rows[row].Field <string>(Alias.Primary_Key);
                        results.Add(new CompareResultModel(primary_key, mapping, left, right, row));

                        var detail = string.Format("{0} {1} {2}\r\n\r\nValues [{3}] {1} [{4}]",
                                                   mapping.LeftAlias, mapping.Operator, mapping.RightAlias, left, right);

                        if (parms.Exception != null)
                        {
                            Model.ErrorMessages.Add(new ErrorMessageModel("Comparison", detail, parms.GetException()));
                        }

                        string key = mapping.LeftSide;
                        pairs.AddOrUpdate(key, 1, (existingKey, existingVal) => existingVal + 1);
                    }
                }
                else
                {
                    StatusMessage = "Skipped";
                    pairs.AddOrUpdate(mapping.LeftSide, 1, (existingKey, existingVal) => existingVal);
                }
            }
            OnStatusEvent(mapping, results, currentRow, StatusMessage, startTime);
        }
        /// <summary>
        /// Compares the columns.
        /// </summary>
        /// <param name="currentRow">The current row.</param>
        /// <param name="table">The table.</param>
        /// <param name="compare">The compare.</param>
        /// <param name="model">The model.</param>
        /// <param name="cancelToken">The cancel token.</param>
        /// <returns>List&lt;CompareResultModel&gt;.</returns>
        public List<CompareResultModel> CompareColumns2(int currentRow, DataTable table, CompareMappingModel compare, CompareModel model, CancellationTokenSource cancelToken)
        {
            List<CompareResultModel> results = new List<CompareResultModel>();
            GenericCompare comparer = new GenericCompare();

            string statusMessage = "Completed";
            this.CancelToken = cancelToken;
            DateTime startTime = DateTime.Now;

            CompareParameters parms = new CompareParameters(compare.Operator);
            parms.Add(model.Source.TimeZoneOffset, model.Target.TimeZoneOffset, compare.ToDictionary(compare.LeftLookupFile), compare.ToDictionary(compare.RightLookupFile));            

            OnStatusEvent(this, NewEventStatus(table, compare, currentRow, startTime));
            pairs.AddOrUpdate(compare.LeftSide, 0, (existingKey, existingVal) => 0);
            
            for (int row = 0; row < table.Rows.Count; row++)
            {
                var sourceValue = ToString(table.Rows[row][compare.LeftKey]);
                var targetValue = ToString(table.Rows[row][compare.RightKey]);
                
                if (comparer.ContainsKey(compare.CompareType))
                {
                    if (!comparer[compare.CompareType](sourceValue, targetValue, parms.Operator, parms))
                    {
                        var primary_key = table.Rows[row].Field<string>(Alias.Primary_Key);
                        results.Add(new CompareResultModel(primary_key, compare.LeftSide, compare.RightSide, sourceValue, targetValue, row));
                        var detail = string.Format("{0} {1} {2}\r\n\t   Values {3} {1} {4}", 
                            compare.LeftAlias, compare.Operator, compare.RightAlias, sourceValue, targetValue);

                        if (parms.Exception != null)
                            model.ErrorMessages.Add(new ErrorMessageModel("Comparison", detail, parms.GetException()));

                        string key = compare.LeftSide;
                        pairs.AddOrUpdate(key, 1, (existingKey, existingVal) => existingVal + 1);
                    }
                }
                else
                {
                    statusMessage = "Skipped";
                    pairs.AddOrUpdate(compare.LeftSide, 1, (existingKey, existingVal) => existingVal);
                }
            }
            OnStatusEvent(this, NewEventStatus(table, compare, results, currentRow, statusMessage, startTime));
            return results;

        }