public ProgressContext(string preText, double min, double max, IProgressOutput output) : this(min, max, output) { PreText = preText; _state.PreText = preText; }
public ProgressContext(IProgressOutput output) { ContractAssertions.IsNotNull(output, nameof(output)); _output = output; _state = new ProgressState { MaxPercentage = 100.0, MaxValue = -1 }; }
public ProgressContext(double min, double max, IProgressOutput output) : this(output) { if (min > max) { throw new InvalidOperationException($"The min value ({min}) has to be smaller than the max value ({max})."); } MinPercentage = Math.Max(0, min); MaxPercentage = Math.Min(100.0, max); _state.MinPercentage = MinPercentage; _state.MaxPercentage = MaxPercentage; }