From c0c57038b57402364e6dac00fe8b3d7668df0594 Mon Sep 17 00:00:00 2001 From: Breno RdV Date: Wed, 5 Jun 2024 22:30:41 -0400 Subject: [PATCH] Used pattern instead of &&. --- .../Calculators/Handlers/TimeInRangeCalculatorHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Raccoon.Ninja.Domain.Core/Calculators/Handlers/TimeInRangeCalculatorHandler.cs b/Raccoon.Ninja.Domain.Core/Calculators/Handlers/TimeInRangeCalculatorHandler.cs index 5da5094..8f9d816 100644 --- a/Raccoon.Ninja.Domain.Core/Calculators/Handlers/TimeInRangeCalculatorHandler.cs +++ b/Raccoon.Ninja.Domain.Core/Calculators/Handlers/TimeInRangeCalculatorHandler.cs @@ -13,8 +13,8 @@ public class TimeInRangeCalculatorHandler: BaseCalculatorHandler protected override CalculationData RunCalculation(CalculationData data) { var low = data.GlucoseValues.Count(v => v < GlucoseConstants.LowGlucoseThreshold); - var normal = data.GlucoseValues.Count(v => v >= GlucoseConstants.LowGlucoseThreshold && v < GlucoseConstants.HighGlucoseThreshold); - var high = data.GlucoseValues.Count(v => v >= GlucoseConstants.HighGlucoseThreshold && v <= GlucoseConstants.VeryHighGlucoseThreshold); + var normal = data.GlucoseValues.Count(v => v is >= GlucoseConstants.LowGlucoseThreshold and < GlucoseConstants.HighGlucoseThreshold); + var high = data.GlucoseValues.Count(v => v is >= GlucoseConstants.HighGlucoseThreshold and <= GlucoseConstants.VeryHighGlucoseThreshold); var veryHigh = data.GlucoseValues.Count(v => v > GlucoseConstants.VeryHighGlucoseThreshold); return data with