@@ -12,7 +12,9 @@ namespace SixLabors
1212 /// Provides methods to protect against invalid parameters.
1313 /// </summary>
1414 [ DebuggerStepThrough ]
15+ #pragma warning disable CS0436 // Type conflicts with imported type
1516 [ ExcludeFromCodeCoverage ]
17+ #pragma warning restore CS0436 // Type conflicts with imported type
1618 internal static partial class Guard
1719 {
1820 /// <summary>
@@ -22,7 +24,7 @@ internal static partial class Guard
2224 /// <param name="parameterName">The name of the parameter that is to be checked.</param>
2325 /// <typeparam name="TValue">The type of the value.</typeparam>
2426 /// <exception cref="ArgumentNullException"><paramref name="value"/> is null.</exception>
25- [ MethodImpl ( InliningOptions . ShortMethod ) ]
27+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
2628 public static void NotNull < TValue > ( TValue value , string parameterName )
2729 where TValue : class
2830 {
@@ -39,7 +41,7 @@ public static void NotNull<TValue>(TValue value, string parameterName)
3941 /// <param name="parameterName">Name of the parameter.</param>
4042 /// <exception cref="ArgumentNullException"><paramref name="value"/> is null.</exception>
4143 /// <exception cref="ArgumentException"><paramref name="value"/> is empty or contains only blanks.</exception>
42- [ MethodImpl ( InliningOptions . ShortMethod ) ]
44+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
4345 public static void NotNullOrWhiteSpace ( string value , string parameterName )
4446 {
4547 if ( string . IsNullOrWhiteSpace ( value ) )
@@ -58,7 +60,7 @@ public static void NotNullOrWhiteSpace(string value, string parameterName)
5860 /// <exception cref="ArgumentException">
5961 /// <paramref name="value"/> is greater than the maximum value.
6062 /// </exception>
61- [ MethodImpl ( InliningOptions . ShortMethod ) ]
63+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
6264 public static void MustBeLessThan < TValue > ( TValue value , TValue max , string parameterName )
6365 where TValue : IComparable < TValue >
6466 {
@@ -79,7 +81,7 @@ public static void MustBeLessThan<TValue>(TValue value, TValue max, string param
7981 /// <exception cref="ArgumentException">
8082 /// <paramref name="value"/> is greater than the maximum value.
8183 /// </exception>
82- [ MethodImpl ( InliningOptions . ShortMethod ) ]
84+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
8385 public static void MustBeLessThanOrEqualTo < TValue > ( TValue value , TValue max , string parameterName )
8486 where TValue : IComparable < TValue >
8587 {
@@ -100,7 +102,7 @@ public static void MustBeLessThanOrEqualTo<TValue>(TValue value, TValue max, str
100102 /// <exception cref="ArgumentException">
101103 /// <paramref name="value"/> is less than the minimum value.
102104 /// </exception>
103- [ MethodImpl ( InliningOptions . ShortMethod ) ]
105+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
104106 public static void MustBeGreaterThan < TValue > ( TValue value , TValue min , string parameterName )
105107 where TValue : IComparable < TValue >
106108 {
@@ -121,7 +123,7 @@ public static void MustBeGreaterThan<TValue>(TValue value, TValue min, string pa
121123 /// <exception cref="ArgumentException">
122124 /// <paramref name="value"/> is less than the minimum value.
123125 /// </exception>
124- [ MethodImpl ( InliningOptions . ShortMethod ) ]
126+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
125127 public static void MustBeGreaterThanOrEqualTo < TValue > ( TValue value , TValue min , string parameterName )
126128 where TValue : IComparable < TValue >
127129 {
@@ -143,7 +145,7 @@ public static void MustBeGreaterThanOrEqualTo<TValue>(TValue value, TValue min,
143145 /// <exception cref="ArgumentException">
144146 /// <paramref name="value"/> is less than the minimum value of greater than the maximum value.
145147 /// </exception>
146- [ MethodImpl ( InliningOptions . ShortMethod ) ]
148+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
147149 public static void MustBeBetweenOrEqualTo < TValue > ( TValue value , TValue min , TValue max , string parameterName )
148150 where TValue : IComparable < TValue >
149151 {
@@ -163,7 +165,7 @@ public static void MustBeBetweenOrEqualTo<TValue>(TValue value, TValue min, TVal
163165 /// <exception cref="ArgumentException">
164166 /// <paramref name="target"/> is false.
165167 /// </exception>
166- [ MethodImpl ( InliningOptions . ShortMethod ) ]
168+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
167169 public static void IsTrue ( bool target , string parameterName , string message )
168170 {
169171 if ( ! target )
@@ -182,7 +184,7 @@ public static void IsTrue(bool target, string parameterName, string message)
182184 /// <exception cref="ArgumentException">
183185 /// <paramref name="target"/> is true.
184186 /// </exception>
185- [ MethodImpl ( InliningOptions . ShortMethod ) ]
187+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
186188 public static void IsFalse ( bool target , string parameterName , string message )
187189 {
188190 if ( target )
@@ -201,7 +203,7 @@ public static void IsFalse(bool target, string parameterName, string message)
201203 /// <exception cref="ArgumentException">
202204 /// <paramref name="source"/> has less than <paramref name="minLength"/> items.
203205 /// </exception>
204- [ MethodImpl ( InliningOptions . ShortMethod ) ]
206+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
205207 public static void MustBeSizedAtLeast < T > ( ReadOnlySpan < T > source , int minLength , string parameterName )
206208 {
207209 if ( source . Length < minLength )
@@ -220,7 +222,7 @@ public static void MustBeSizedAtLeast<T>(ReadOnlySpan<T> source, int minLength,
220222 /// <exception cref="ArgumentException">
221223 /// <paramref name="source"/> has less than <paramref name="minLength"/> items.
222224 /// </exception>
223- [ MethodImpl ( InliningOptions . ShortMethod ) ]
225+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
224226 public static void MustBeSizedAtLeast < T > ( Span < T > source , int minLength , string parameterName )
225227 {
226228 if ( source . Length < minLength )
@@ -237,7 +239,7 @@ public static void MustBeSizedAtLeast<T>(Span<T> source, int minLength, string p
237239 /// <param name="source">The source span.</param>
238240 /// <param name="destination">The destination span.</param>
239241 /// <param name="destinationParamName">The name of the argument for 'destination'.</param>
240- [ MethodImpl ( InliningOptions . ShortMethod ) ]
242+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
241243 public static void DestinationShouldNotBeTooShort < TSource , TDest > (
242244 ReadOnlySpan < TSource > source ,
243245 Span < TDest > destination ,
@@ -257,7 +259,7 @@ public static void DestinationShouldNotBeTooShort<TSource, TDest>(
257259 /// <param name="source">The source span.</param>
258260 /// <param name="destination">The destination span.</param>
259261 /// <param name="destinationParamName">The name of the argument for 'destination'.</param>
260- [ MethodImpl ( InliningOptions . ShortMethod ) ]
262+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
261263 public static void DestinationShouldNotBeTooShort < TSource , TDest > (
262264 Span < TSource > source ,
263265 Span < TDest > destination ,
0 commit comments