public static void CheckNotNull <T>(this T container) where T : class { if (container == null) { throw new ArgumentNullException("container"); } NullChecker <T> .Check(container); }
internal static T CheckNotNull <T>(this T value) where T : class { if (null == value) { throw new ArgumentNullException("value"); } return(NullChecker <T> .Check(value)); }
public static void ThrowIfNull <T>(this T container) where T : class { if (container == null) { throw new ArgumentNullException(nameof(container)); } NullChecker <T> .Check(container); }
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); }
public static void AgainstNullArgument <T>(T container) where T : class { if (container == null) { throw new ArgumentNullException(nameof(container)); } NullChecker <T> .Check(container); }