public void Report0Perc() { if (!HasReported0Perc) { ProgressCallback?.Report(0d); HasReported0Perc = true; } }
public void EnsureReported100Perc() { if (!HasReported100Perc) { ProgressCallback?.Report(1d); HasReported100Perc = true; } }
public void EnsureReported100Perc(double area) { if (!HasReported100Perc) { ProgressCallback?.Report(new AreaCalculationProgress(1d, area)); HasReported100Perc = true; } }
public void Report0Perc() { if (!HasReported0Perc) { ProgressCallback?.Report(new AreaCalculationProgress(0d, 0d)); HasReported0Perc = true; } }
public void ReportProgress(double?progress = null) { var reportedProgress = progress ?? Progress; if (ShouldReportProgress && !(reportedProgress == 0d && HasReported0Perc) && !(reportedProgress == 1d && HasReported100Perc)) { ProgressCallback?.Report(reportedProgress); if (reportedProgress == 1d) { HasReported100Perc = true; } if (reportedProgress == 0d) { HasReported0Perc = true; } } }
public void ReportProgress(double area, double?progress = null) { var reportedProgress = progress ?? Progress; if (ShouldReportProgress && !(reportedProgress == 0d && HasReported0Perc) && !(reportedProgress == 1d && HasReported100Perc)) { ProgressCallback.Report(new AreaCalculationProgress(reportedProgress, area)); if (reportedProgress == 1d) { HasReported100Perc = true; } if (reportedProgress == 0d) { HasReported0Perc = true; } } }
private void ReportProgress(int value) { ProgressCallback?.Report(value); }