1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-11-01 00:12:30 +01:00
Sonarr/NzbDrone.Common/EnsureThat/EnsureGuidExtensions.cs

18 lines
501 B
C#
Raw Normal View History

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;
}
}
}