コード例 #1
0
 /// <summary>An ICollection&lt;T&gt; extension method that throw if null or empty.</summary>
 ///
 /// <typeparam name="T">Generic type parameter.</typeparam>
 /// <param name="collection">The collection to act on.</param>
 /// <param name="varName">   Name of the variable.</param>
 public static void ThrowIfNullOrEmpty <T>(this ICollection <T> collection, string varName)
 {
     Proxy.ThrowIfNullOrEmpty(collection, varName);
 }
コード例 #2
0
 /// <summary>An ICollection&lt;T&gt; extension method that throw if null or empty.</summary>
 ///
 /// <typeparam name="T">Generic type parameter.</typeparam>
 /// <param name="collection">The collection to act on.</param>
 public static void ThrowIfNullOrEmpty <T>(this ICollection <T> collection)
 {
     Proxy.ThrowIfNullOrEmpty(collection);
 }
コード例 #3
0
 /// <summary>An ICollection extension method that throw if null or empty.</summary>
 ///
 /// <param name="strValue">The strValue to act on.</param>
 /// <param name="varName"> Name of the variable.</param>
 public static void ThrowIfNullOrEmpty(this string strValue, string varName)
 {
     Proxy.ThrowIfNullOrEmpty(strValue, varName);
 }
コード例 #4
0
 /// <summary>An object extension method that throw if null.</summary>
 ///
 /// <param name="obj">    The obj to act on.</param>
 /// <param name="varName">Name of the variable.</param>
 public static void ThrowIfNull(this object obj, string varName)
 {
     Proxy.ThrowIfNull(obj, varName);
 }
コード例 #5
0
 /// <summary>An object extension method that throw if null.</summary>
 ///
 /// <param name="obj">The obj to act on.</param>
 public static void ThrowIfNull(this object obj)
 {
     Proxy.ThrowIfNull(obj);
 }
コード例 #6
0
 /// <summary>Throw on first null.</summary>
 ///
 /// <param name="objs">A variable-length parameters list containing objects.</param>
 public static void ThrowOnFirstNull(params object[] objs)
 {
     Proxy.ThrowOnFirstNull(objs);
 }