Renamed to IsValueWithinLimits
This commit is contained in:
parent
bb8959160a
commit
171b057d58
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user