Exemplo n.º 1
0
 public static void NotDefault(Guid arg, [NotNull, InvokerParameterName] string argName)
 {
     if (arg == Guid.Empty)
     {
         throw CodeExceptions.ArgumentDefault(argName, typeof(Guid));
     }
 }
Exemplo n.º 2
0
 public static void GenericNotDefault <T>(
     [CanBeNull, NoEnumeration] T arg,
     [NotNull, InvokerParameterName] string argName)
 {
     if (Operators <T> .AreEqual(arg, default))
     {
         throw CodeExceptions.ArgumentDefault(argName, typeof(T));
     }
 }