Skip to content

Commit

Permalink
Rename to digits
Browse files Browse the repository at this point in the history
  • Loading branch information
khellang committed Nov 2, 2023
1 parent 7749a50 commit 5bdaf5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Hangfire.Console/Progress/DefaultProgressBar.cs
Original file line number Diff line number Diff line change
@@ -14,15 +14,15 @@ internal class DefaultProgressBar : IProgressBar

private readonly string _progressBarId;

private readonly int _precision;
private readonly int _digits;

private string? _color;

private string? _name;

private double _value;

internal DefaultProgressBar(ConsoleContext context, string progressBarId, string? name, string? color, int precision)
internal DefaultProgressBar(ConsoleContext context, string progressBarId, string? name, string? color, int digits)
{
if (string.IsNullOrEmpty(progressBarId))
{
@@ -31,7 +31,7 @@ internal DefaultProgressBar(ConsoleContext context, string progressBarId, string

_context = context ?? throw new ArgumentNullException(nameof(context));
_progressBarId = progressBarId;
_precision = precision;
_digits = digits;
_name = string.IsNullOrEmpty(name) ? null : name;
_color = string.IsNullOrEmpty(color) ? null : color;
_value = -1;
@@ -44,7 +44,7 @@ public void SetValue(int value)

public void SetValue(double value)
{
value = Math.Round(value, _precision);
value = Math.Round(value, _digits);

if (value < 0 || value > 100)
{

0 comments on commit 5bdaf5d

Please sign in to comment.