From 171b057d580e81f49b5d85dbc18003f710cb8aed Mon Sep 17 00:00:00 2001 From: glax Date: Mon, 12 Feb 2024 02:02:30 +0100 Subject: [PATCH] Renamed to IsValueWithinLimits --- CShocker/Devices/Abstract/Api.cs | 4 ++-- CShocker/Ranges/IntegerRange.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CShocker/Devices/Abstract/Api.cs b/CShocker/Devices/Abstract/Api.cs index 2dd54c5..a371871 100644 --- a/CShocker/Devices/Abstract/Api.cs +++ b/CShocker/Devices/Abstract/Api.cs @@ -25,12 +25,12 @@ public abstract class Api : IDisposable this.Logger?.Log(LogLevel.Information, "No action defined."); enqueueItem = false; } - if (!ValidIntensityRange.ValueWithinLimits(intensity)) + if (!ValidIntensityRange.IsValueWithinLimits(intensity)) { this.Logger?.Log(LogLevel.Information, $"Value not within allowed {nameof(intensity)}-Range ({ValidIntensityRange.RangeString()}): {intensity}"); enqueueItem = false; } - if (!ValidDurationRange.ValueWithinLimits(duration)) + if (!ValidDurationRange.IsValueWithinLimits(duration)) { this.Logger?.Log(LogLevel.Information, $"Value not within allowed {nameof(duration)}-Range ({ValidIntensityRange.RangeString()}): {duration}"); enqueueItem = false; diff --git a/CShocker/Ranges/IntegerRange.cs b/CShocker/Ranges/IntegerRange.cs index dea1aa2..de975f0 100644 --- a/CShocker/Ranges/IntegerRange.cs +++ b/CShocker/Ranges/IntegerRange.cs @@ -11,7 +11,7 @@ public readonly struct IntegerRange this.Max = max; } - public bool ValueWithinLimits(int value) + public bool IsValueWithinLimits(int value) { return value >= this.Min && value <= this.Max; }