/// <summary> /// Called when [status event]. /// </summary> /// <param name="model">The model.</param> /// <param name="currentRow">The current row.</param> /// <param name="startTime">The start time.</param> private void OnStatusEvent(CompareMappingModel model, int currentRow, DateTime startTime) { var e = new CompareHelperEventArgs() { CurrentRow = currentRow, StartTime = startTime, Status = "Running", Source = model.LeftSide, Current = Table.Rows.Count, ErrorCount = 0, RowCount = Table.Rows.Count }; OnStatusEvent(this, e); }
/// <summary> /// Called when [status event]. /// </summary> /// <param name="mapping">The mapping.</param> /// <param name="results">The results.</param> /// <param name="currentRow">The current row.</param> /// <param name="statusMessage">The status message.</param> /// <param name="startTime">The start time.</param> private void OnStatusEvent(CompareMappingModel mapping, List <CompareResultModel> results, int currentRow, string statusMessage, DateTime startTime) { var e = new CompareHelperEventArgs() { CurrentRow = currentRow, StartTime = startTime, EndTime = DateTime.Now, Status = statusMessage, Source = mapping.LeftSide, Current = Table.Rows.Count, ErrorCount = !pairs.ContainsKey(mapping.LeftSide) ? 0 : pairs[mapping.LeftSide], RowCount = Table.Rows.Count, Results = results }; OnStatusEvent(this, e); }
/// <summary> /// Handles the <see cref="E:StatusEvent" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="CompareHelperEventArgs"/> instance containing the event data.</param> public virtual void OnStatusEvent(object sender, CompareHelperEventArgs e) { StatusEvent?.Invoke(this, e); }