1
- using System ;
2
- using JetBrains . Annotations ;
1
+ using JetBrains . Annotations ;
3
2
4
3
namespace ByteDecoder . Common . GuardClauses
5
4
{
@@ -22,7 +21,7 @@ private Guard() { }
22
21
/// <typeparam name="T">Generic type for the guard.</typeparam>
23
22
/// <param name="source">Instance source.</param>
24
23
/// <param name="paramName">Param name.</param>
25
- public void IfArgumentIsNull < T > ( [ NoEnumeration ] [ ValidatedNotNull ] T source , string paramName ) where T : class
24
+ public void IfArgumentIsNull < T > ( [ NoEnumeration ] [ ValidatedNotNull ] T source , string paramName )
26
25
{
27
26
if ( source == null )
28
27
throw new ArgumentNullException ( paramName ) ;
@@ -35,7 +34,10 @@ public void IfArgumentIsNull<T>([NoEnumeration][ValidatedNotNull] T source, stri
35
34
/// <param name="source">Instance source.</param>
36
35
/// <param name="paramName">Param name.</param>
37
36
/// <param name="message">Message if guard clause breaks.</param>
38
- public void IfArgumentIsNull < T > ( [ NoEnumeration ] [ ValidatedNotNull ] T source , string paramName , string message ) where T : class
37
+ public void IfArgumentIsNull < T > (
38
+ [ NoEnumeration ] [ ValidatedNotNull ] T source ,
39
+ string paramName ,
40
+ string message )
39
41
{
40
42
if ( source == null )
41
43
throw new ArgumentNullException ( paramName , message ) ;
@@ -46,7 +48,7 @@ public void IfArgumentIsNull<T>([NoEnumeration][ValidatedNotNull] T source, stri
46
48
/// </summary>
47
49
/// <param name="source">Instance source.</param>
48
50
/// <param name="paramName">Param name.</param>
49
- public void IfArgumentIsNullOrEmpty ( string source , string paramName )
51
+ public void IfArgumentIsNullOrEmpty ( string ? source , string paramName )
50
52
{
51
53
if ( string . IsNullOrEmpty ( source ) )
52
54
throw new ArgumentNullException ( paramName ) ;
@@ -58,7 +60,7 @@ public void IfArgumentIsNullOrEmpty(string source, string paramName)
58
60
/// <param name="source">Instance source.</param>
59
61
/// <param name="paramName">Param name.</param>
60
62
/// <param name="message">Message if guard clause breaks.</param>
61
- public void IfArgumentIsNullOrEmpty ( string source , string paramName , string message )
63
+ public void IfArgumentIsNullOrEmpty ( string ? source , string paramName , string message )
62
64
{
63
65
if ( string . IsNullOrEmpty ( source ) )
64
66
throw new ArgumentNullException ( paramName , message ) ;
0 commit comments