Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/src/commit/2f204e3d29152c7ff62020f3308b3310ed8c26c3/NzbDrone.Common/EnsureThat/EnsureDoubleExtensions.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
Prowlarr/NzbDrone.Common/EnsureThat/EnsureDoubleExtensions.cs

56 lines
2.1 KiB

using System.Diagnostics;
using NzbDrone.Common.EnsureThat.Resources;
namespace NzbDrone.Common.EnsureThat
{
public static class EnsureDoubleExtensions
{
[DebuggerStepThrough]
public static Param<double> IsLt(this Param<double> param, double limit)
{
if (param.Value >= limit)
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotLt.Inject(param.Value, limit));
return param;
}
[DebuggerStepThrough]
public static Param<double> IsLte(this Param<double> param, double limit)
{
if (!(param.Value <= limit))
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotLte.Inject(param.Value, limit));
return param;
}
[DebuggerStepThrough]
public static Param<double> IsGt(this Param<double> param, double limit)
{
if (param.Value <= limit)
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotGt.Inject(param.Value, limit));
return param;
}
[DebuggerStepThrough]
public static Param<double> IsGte(this Param<double> param, double limit)
{
if (!(param.Value >= limit))
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotGte.Inject(param.Value, limit));
return param;
}
[DebuggerStepThrough]
public static Param<double> IsInRange(this Param<double> param, double min, double max)
{
if (param.Value < min)
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotInRange_ToLow.Inject(param.Value, min));
if (param.Value > max)
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotInRange_ToHigh.Inject(param.Value, max));
return param;
}
}
}