forked from ServiceStack/ServiceStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssertExtensions.cs
More file actions
58 lines (47 loc) · 1.58 KB
/
AssertExtensions.cs
File metadata and controls
58 lines (47 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
using System;
using System.Collections;
using System.Collections.Generic;
using Proxy = ServiceStack.Common.AssertExtensions;
namespace ServiceStack.Common.Extensions
{
[Obsolete("Use ServiceStack.Common.AssertExtensions")]
public static class AssertExtensions
{
public static void ThrowOnFirstNull(params object[] objs)
{
Proxy.ThrowOnFirstNull(objs);
}
public static void ThrowIfNull(this object obj)
{
Proxy.ThrowIfNull(obj);
}
public static void ThrowIfNull(this object obj, string varName)
{
Proxy.ThrowIfNull(obj, varName);
}
public static void ThrowIfNullOrEmpty(this string strValue)
{
Proxy.ThrowIfNullOrEmpty(strValue);
}
public static void ThrowIfNullOrEmpty(this string strValue, string varName)
{
Proxy.ThrowIfNullOrEmpty(strValue, varName);
}
public static void ThrowIfNullOrEmpty(this ICollection collection)
{
Proxy.ThrowIfNullOrEmpty(collection);
}
public static void ThrowIfNullOrEmpty(this ICollection collection, string varName)
{
Proxy.ThrowIfNullOrEmpty(collection, varName);
}
public static void ThrowIfNullOrEmpty<T>(this ICollection<T> collection)
{
Proxy.ThrowIfNullOrEmpty(collection);
}
public static void ThrowIfNullOrEmpty<T>(this ICollection<T> collection, string varName)
{
Proxy.ThrowIfNullOrEmpty(collection, varName);
}
}
}