@@ -18,7 +18,6 @@ internal static partial class ThrowHelper
18
18
/// </summary>
19
19
/// <param name="name">The argument name.</param>
20
20
[ DoesNotReturn ]
21
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
22
21
public static void ThrowArgumentNullExceptionForNotNull ( string name )
23
22
=> ThrowArgumentNullException ( name , $ "Parameter \" { name } \" must be not null.") ;
24
23
@@ -28,7 +27,6 @@ public static void ThrowArgumentNullExceptionForNotNull(string name)
28
27
/// <param name="value">The value.</param>
29
28
/// <param name="name">The argument name.</param>
30
29
[ DoesNotReturn ]
31
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
32
30
public static void ThrowArgumentExceptionForNotNullOrWhitespace ( string value , string name )
33
31
{
34
32
if ( value is null )
@@ -49,7 +47,6 @@ public static void ThrowArgumentExceptionForNotNullOrWhitespace(string value, st
49
47
/// <param name="max">The maximum allowable value.</param>
50
48
/// <param name="name">The argument name.</param>
51
49
[ DoesNotReturn ]
52
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
53
50
public static void ThrowArgumentOutOfRangeExceptionForMustBeLessThan < T > ( T value , T max , string name )
54
51
=> ThrowArgumentOutOfRangeException ( name , $ "Parameter \" { name } \" ({ typeof ( T ) } ) must be less than { max } , was { value } ") ;
55
52
@@ -61,7 +58,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeLessThan<T>(T value,
61
58
/// <param name="maximum">The maximum allowable value.</param>
62
59
/// <param name="name">The argument name.</param>
63
60
[ DoesNotReturn ]
64
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
65
61
public static void ThrowArgumentOutOfRangeExceptionForMustBeLessThanOrEqualTo < T > ( T value , T maximum , string name )
66
62
=> ThrowArgumentOutOfRangeException ( name , $ "Parameter \" { name } \" ({ typeof ( T ) } ) must be less than or equal to { maximum } , was { value } ") ;
67
63
@@ -73,7 +69,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeLessThanOrEqualTo<T>
73
69
/// <param name="minimum">The minimum allowable value.</param>
74
70
/// <param name="name">The argument name.</param>
75
71
[ DoesNotReturn ]
76
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
77
72
public static void ThrowArgumentOutOfRangeExceptionForMustBeGreaterThan < T > ( T value , T minimum , string name )
78
73
=> ThrowArgumentOutOfRangeException ( name , $ "Parameter \" { name } \" ({ typeof ( T ) } ) must be greater than { minimum } , was { value } ") ;
79
74
@@ -85,7 +80,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeGreaterThan<T>(T val
85
80
/// <param name="minimum">The minimum allowable value.</param>
86
81
/// <param name="name">The argument name.</param>
87
82
[ DoesNotReturn ]
88
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
89
83
public static void ThrowArgumentOutOfRangeExceptionForMustBeGreaterThanOrEqualTo < T > ( T value , T minimum , string name )
90
84
=> ThrowArgumentOutOfRangeException ( name , $ "Parameter \" { name } \" ({ typeof ( T ) } ) must be greater than or equal to { minimum } , was { value } ") ;
91
85
@@ -98,7 +92,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeGreaterThanOrEqualTo
98
92
/// <param name="maximum">The maximum allowable value.</param>
99
93
/// <param name="name">The argument name.</param>
100
94
[ DoesNotReturn ]
101
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
102
95
public static void ThrowArgumentOutOfRangeExceptionForMustBeBetweenOrEqualTo < T > ( T value , T minimum , T maximum , string name )
103
96
=> ThrowArgumentOutOfRangeException ( name , $ "Parameter \" { name } \" ({ typeof ( T ) } ) must be between or equal to { minimum } and { maximum } , was { value } ") ;
104
97
@@ -108,7 +101,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeBetweenOrEqualTo<T>(
108
101
/// <param name="minLength">The minimum allowable length.</param>
109
102
/// <param name="parameterName">The paramere name.</param>
110
103
[ DoesNotReturn ]
111
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
112
104
public static void ThrowArgumentOutOfRangeExceptionForMustBeSizedAtLeast ( int minLength , string parameterName )
113
105
=> ThrowArgumentException ( $ "Spans must be at least of length { minLength } !", parameterName ) ;
114
106
@@ -119,7 +111,6 @@ public static void ThrowArgumentOutOfRangeExceptionForMustBeSizedAtLeast(int min
119
111
/// <param name="name">The argument name.</param>
120
112
/// <exception cref="ArgumentException">Thrown with <paramref name="message"/> and <paramref name="name"/>.</exception>
121
113
[ DoesNotReturn ]
122
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
123
114
public static void ThrowArgumentException ( string message , string name )
124
115
=> throw new ArgumentException ( message , name ) ;
125
116
@@ -130,7 +121,6 @@ public static void ThrowArgumentException(string message, string name)
130
121
/// <param name="message">The message to include in the exception.</param>
131
122
/// <exception cref="ArgumentNullException">Thrown with <paramref name="name"/> and <paramref name="message"/>.</exception>
132
123
[ DoesNotReturn ]
133
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
134
124
public static void ThrowArgumentNullException ( string name , string message )
135
125
=> throw new ArgumentNullException ( name , message ) ;
136
126
@@ -141,7 +131,6 @@ public static void ThrowArgumentNullException(string name, string message)
141
131
/// <param name="message">The message to include in the exception.</param>
142
132
/// <exception cref="ArgumentOutOfRangeException">Thrown with <paramref name="name"/> and <paramref name="message"/>.</exception>
143
133
[ DoesNotReturn ]
144
- [ MethodImpl ( MethodImplOptions . NoInlining ) ]
145
134
public static void ThrowArgumentOutOfRangeException ( string name , string message )
146
135
=> throw new ArgumentOutOfRangeException ( name , message ) ;
147
136
}
0 commit comments