Esempio n. 1
0
 /// <summary>
 /// Requires that a reference is non-null.
 /// </summary>
 /// <param name="reference">The reference to check.</param>
 /// <param name="argName">The arg name to put in the exception.</param>
 /// <exception cref="ArgumentNullException">If <paramref name="reference"/> is null.</exception>
 public static void RequireReference <T>([NotNull] T?reference, string argName)
     where T : class
 {
     if (reference == null)
     {
         throw Exceptions.NewArgumentNullException(argName);
     }
 }
Esempio n. 2
0
 public ReadOnlySetDebugView(ReadOnlySet <T> set)
 {
     this.set = set ?? throw Exceptions.NewArgumentNullException(nameof(set));
 }