mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
upgraded to autofac 3. created nancy only mode for nzbdrone.exe /n
This commit is contained in:
parent
177f88303c
commit
b0940ed8de
77 changed files with 3930 additions and 113 deletions
26
NzbDrone.Common/EnsureThat/EnsureBoolExtensions.cs
Normal file
26
NzbDrone.Common/EnsureThat/EnsureBoolExtensions.cs
Normal file
|
@ -0,0 +1,26 @@
|
|||
using System.Diagnostics;
|
||||
using NzbDrone.Common.EnsureThat.Resources;
|
||||
|
||||
namespace NzbDrone.Common.EnsureThat
|
||||
{
|
||||
public static class EnsureBoolExtensions
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public static Param<bool> IsTrue(this Param<bool> param)
|
||||
{
|
||||
if (!param.Value)
|
||||
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotTrue);
|
||||
|
||||
return param;
|
||||
}
|
||||
|
||||
[DebuggerStepThrough]
|
||||
public static Param<bool> IsFalse(this Param<bool> param)
|
||||
{
|
||||
if (param.Value)
|
||||
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotFalse);
|
||||
|
||||
return param;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue