public static void CheckNotNull <T>(this T container) where T : class
 {
     if (container == null)
     {
         throw new ArgumentNullException("container");
     }
     NullChecker <T> .Check(container);
 }
Beispiel #2
0
 internal static T CheckNotNull <T>(this T value) where T : class
 {
     if (null == value)
     {
         throw new ArgumentNullException("value");
     }
     return(NullChecker <T> .Check(value));
 }
Beispiel #3
0
 public static void ThrowIfNull <T>(this T container) where T : class
 {
     if (container == null)
     {
         throw new ArgumentNullException(nameof(container));
     }
     NullChecker <T> .Check(container);
 }
Beispiel #4
0
 public static void RequiresNotNull <T>(T container, string userMessage) where T : class
 {
     if (container == null)
     {
         throw new ArgumentNullException("container", userMessage);
     }
     NullChecker <T> .Check(container, userMessage);
 }
Beispiel #5
0
        public static void AgainstNullArgument <T>(T container) where T : class
        {
            if (container == null)
            {
                throw new ArgumentNullException(nameof(container));
            }

            NullChecker <T> .Check(container);
        }