From 5bdaf5d2dbf9e15deac70705ecf9172f90c2861b Mon Sep 17 00:00:00 2001 From: Kristian Hellang Date: Thu, 2 Nov 2023 21:43:18 +0100 Subject: [PATCH] Rename to digits --- src/Hangfire.Console/Progress/DefaultProgressBar.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Hangfire.Console/Progress/DefaultProgressBar.cs b/src/Hangfire.Console/Progress/DefaultProgressBar.cs index fca0b1c..294ea9f 100644 --- a/src/Hangfire.Console/Progress/DefaultProgressBar.cs +++ b/src/Hangfire.Console/Progress/DefaultProgressBar.cs @@ -14,7 +14,7 @@ internal class DefaultProgressBar : IProgressBar private readonly string _progressBarId; - private readonly int _precision; + private readonly int _digits; private string? _color; @@ -22,7 +22,7 @@ internal class DefaultProgressBar : IProgressBar 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) {