mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
upgraded to autofac 3. created nancy only mode for nzbdrone.exe /n
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using System.Diagnostics;
|
||||
using NzbDrone.Common.EnsureThat.Resources;
|
||||
|
||||
namespace NzbDrone.Common.EnsureThat
|
||||
{
|
||||
public static class EnsureNullableValueTypeExtensions
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public static Param<T?> IsNotNull<T>(this Param<T?> param) where T : struct
|
||||
{
|
||||
if (param.Value == null || !param.Value.HasValue)
|
||||
throw ExceptionFactory.CreateForParamNullValidation(param.Name, ExceptionMessages.EnsureExtensions_IsNotNull);
|
||||
|
||||
return param;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user