mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 09:09:42 +02:00
upgraded to autofac 3. created nancy only mode for nzbdrone.exe /n
This commit is contained in:
18
NzbDrone.Common/EnsureThat/EnsureGuidExtensions.cs
Normal file
18
NzbDrone.Common/EnsureThat/EnsureGuidExtensions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using NzbDrone.Common.EnsureThat.Resources;
|
||||
|
||||
namespace NzbDrone.Common.EnsureThat
|
||||
{
|
||||
public static class EnsureGuidExtensions
|
||||
{
|
||||
[DebuggerStepThrough]
|
||||
public static Param<Guid> IsNotEmpty(this Param<Guid> param)
|
||||
{
|
||||
if (Guid.Empty.Equals(param.Value))
|
||||
throw ExceptionFactory.CreateForParamValidation(param.Name, ExceptionMessages.EnsureExtensions_IsEmptyGuid);
|
||||
|
||||
return param;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user