AssertExtensions
Assembly: ServiceStack.Common.dll
View Source
Declaration
public static class AssertExtensions
Methods
ThrowOnFirstNull(Object[])
View Source
Declaration
public static void ThrowOnFirstNull(params object[] objs)
Parameters
Type | Name |
---|---|
System.Object[] | objs |
ThrowIfNull(Object)
View Source
Declaration
public static void ThrowIfNull(this object obj)
Parameters
Type | Name |
---|---|
System.Object | obj |
ThrowIfNull(Object, String)
View Source
Declaration
public static void ThrowIfNull(this object obj, string varName)
Parameters
Type | Name |
---|---|
System.Object | obj |
System.String | varName |
ThrowIfNull<T>(T, String)
View Source
Declaration
public static T ThrowIfNull<T>(this T obj, string varName)
Returns
<T>
Parameters
Type | Name |
---|---|
<T> | obj |
System.String | varName |
Type Parameters
T
ThrowIfNullOrEmpty(String)
View Source
Declaration
public static string ThrowIfNullOrEmpty(this string strValue)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | strValue |
ThrowIfNullOrEmpty(String, String)
View Source
Declaration
public static string ThrowIfNullOrEmpty(this string strValue, string varName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | strValue |
System.String | varName |
ThrowIfNullOrEmpty(ICollection)
View Source
Declaration
public static ICollection ThrowIfNullOrEmpty(this ICollection collection)
Returns
System.Collections.ICollection
Parameters
Type | Name |
---|---|
System.Collections.ICollection | collection |
ThrowIfNullOrEmpty(ICollection, String)
View Source
Declaration
public static ICollection ThrowIfNullOrEmpty(this ICollection collection, string varName)
Returns
System.Collections.ICollection
Parameters
Type | Name |
---|---|
System.Collections.ICollection | collection |
System.String | varName |
ThrowIfNullOrEmpty<T>(ICollection<T>)
View Source
Declaration
public static ICollection<T> ThrowIfNullOrEmpty<T>(this ICollection<T> collection)
Returns
System.Collections.Generic.ICollection<<T>>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<<T>> | collection |
Type Parameters
T
ThrowIfNullOrEmpty<T>(ICollection<T>, String)
View Source
Declaration
public static ICollection<T> ThrowIfNullOrEmpty<T>(this ICollection<T> collection, string varName)
Returns
System.Collections.Generic.ICollection<<T>>
Parameters
Type | Name |
---|---|
System.Collections.Generic.ICollection<<T>> | collection |
System.String | varName |
Type Parameters
T