- Notifications
You must be signed in to change notification settings - Fork 549
/
Copy pathDebugCheck.cs
35 lines (31 loc) · 956 Bytes
/
DebugCheck.cs
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
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
#if SQLSERVER
namespaceSystem.Data.Entity.SqlServer.Utilities
#elif SQLSERVERCOMPACT
namespaceSystem.Data.Entity.SqlServerCompact.Utilities
#elif EF_FUNCTIONALS
namespaceSystem.Data.Entity.Functionals.Utilities
#else
namespaceSystem.Data.Entity.Utilities
#endif
{
usingSystem.Diagnostics;
internalclassDebugCheck
{
[Conditional("DEBUG")]
publicstaticvoidNotNull<T>(Tvalue)whereT:class
{
Debug.Assert(value!=null);
}
[Conditional("DEBUG")]
publicstaticvoidNotNull<T>(T?value)whereT:struct
{
Debug.Assert(value!=null);
}
[Conditional("DEBUG")]
publicstaticvoidNotEmpty(stringvalue)
{
Debug.Assert(!string.IsNullOrWhiteSpace(value));
}
}
}