From ab23fdbca148f094258f5feb4291ad2f5ae9391d Mon Sep 17 00:00:00 2001 From: Michael Sevestre Date: Thu, 28 Nov 2019 15:34:50 -0500 Subject: [PATCH] #27 make percent function protected --- src/OSPSuite.Utility/Events/ProgressUpdater.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OSPSuite.Utility/Events/ProgressUpdater.cs b/src/OSPSuite.Utility/Events/ProgressUpdater.cs index e717b10..12b1725 100644 --- a/src/OSPSuite.Utility/Events/ProgressUpdater.cs +++ b/src/OSPSuite.Utility/Events/ProgressUpdater.cs @@ -110,12 +110,12 @@ public virtual void Initialize(int numberOfIterations, string message) public virtual void ReportProgress(int iteration, int numberOfIterations, string message) { _currentIteration = iteration; - _eventPublisher.PublishEvent(new ProgressingEvent(iteration, percentFrom(iteration, numberOfIterations), message)); + _eventPublisher.PublishEvent(new ProgressingEvent(iteration, PercentFrom(iteration, numberOfIterations), message)); } public virtual void ReportStatusMessage(string message) => _eventPublisher.PublishEvent(new StatusMessageEvent(message)); - private int percentFrom(int iteration, int numberOfIterations) + protected virtual int PercentFrom(int iteration, int numberOfIterations) { return (int) Math.Floor((double) iteration * 100 / numberOfIterations); }