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.");
|
this.Logger?.Log(LogLevel.Information, "No action defined.");
|
||||||
enqueueItem = false;
|
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}");
|
this.Logger?.Log(LogLevel.Information, $"Value not within allowed {nameof(intensity)}-Range ({ValidIntensityRange.RangeString()}): {intensity}");
|
||||||
enqueueItem = false;
|
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}");
|
this.Logger?.Log(LogLevel.Information, $"Value not within allowed {nameof(duration)}-Range ({ValidIntensityRange.RangeString()}): {duration}");
|
||||||
enqueueItem = false;
|
enqueueItem = false;
|
||||||
|
@ -11,7 +11,7 @@ public readonly struct IntegerRange
|
|||||||
this.Max = max;
|
this.Max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ValueWithinLimits(int value)
|
public bool IsValueWithinLimits(int value)
|
||||||
{
|
{
|
||||||
return value >= this.Min && value <= this.Max;
|
return value >= this.Min && value <= this.Max;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user