File tree Expand file tree Collapse file tree 7 files changed +34
-6
lines changed Expand file tree Collapse file tree 7 files changed +34
-6
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,12 @@ public static partial class Argument
1212 /// <param name="other">The value to compare with <paramref name="value"/>.</param>
1313 /// <param name="paramName">The name of the parameter with which <paramref name="value"/> corresponds.</param>
1414 [ DebuggerStepThrough ]
15- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1615 [ StackTraceHidden ]
16+ #if NET8_0_OR_GREATER
17+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
18+ #else
19+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
20+ #endif
1721 public static void ThrowIfGreaterThan < T > (
1822 T value ,
1923 T other ,
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ public static partial class Argument
1111 /// <param name="other">The value to compare with <paramref name="value"/>.</param>
1212 /// <param name="paramName">The name of the parameter with which <paramref name="value"/> corresponds.</param>
1313 [ DebuggerStepThrough ]
14- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1514 [ StackTraceHidden ]
15+ #if NET8_0_OR_GREATER
16+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
17+ #else
18+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
19+ #endif
1620 public static void ThrowIfGreaterThanOrEqual < T > (
1721 T value ,
1822 T other ,
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ public static partial class Argument
1111 /// <param name="other">The value to compare with <paramref name="value"/>.</param>
1212 /// <param name="paramName">The name of the parameter with which <paramref name="value"/> corresponds.</param>
1313 [ DebuggerStepThrough ]
14- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1514 [ StackTraceHidden ]
15+ #if NET8_0_OR_GREATER
16+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
17+ #else
18+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
19+ #endif
1620 public static void ThrowIfLessThan < T > (
1721 T value ,
1822 T other ,
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ public static partial class Argument
1111 /// <param name="other">The value to compare with <paramref name="value"/>.</param>
1212 /// <param name="paramName">The name of the parameter with which <paramref name="value"/> corresponds.</param>
1313 [ DebuggerStepThrough ]
14- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1514 [ StackTraceHidden ]
15+ #if NET8_0_OR_GREATER
16+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
17+ #else
18+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
19+ #endif
1620 public static void ThrowIfLessThanOrEqual < T > (
1721 T value ,
1822 T other ,
Original file line number Diff line number Diff line change @@ -11,8 +11,12 @@ public static partial class Argument
1111 /// <param name="argument">The reference type argument to validate as non-null.</param>
1212 /// <param name="paramName">The name of the parameter with which <paramref name="argument"/> corresponds.</param>
1313 [ DebuggerStepThrough ]
14- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1514 [ StackTraceHidden ]
15+ #if NET6_0_OR_GREATER
16+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
17+ #else
18+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
19+ #endif
1620 public static void ThrowIfNull (
1721 [ NotNull ] object ? argument ,
1822 [ CallerArgumentExpression ( nameof ( argument ) ) ] string ? paramName = null
Original file line number Diff line number Diff line change @@ -14,7 +14,11 @@ public static partial class Argument
1414 /// <exception cref="ArgumentException"><paramref name="argument"/> is empty.</exception>
1515 [ DebuggerStepThrough ]
1616 [ StackTraceHidden ]
17+ #if NET7_0_OR_GREATER
1718 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
19+ #else
20+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
21+ #endif
1822 public static void ThrowIfNullOrEmpty (
1923 [ NotNull ] string ? argument ,
2024 [ CallerArgumentExpression ( nameof ( argument ) ) ] string ? paramName = null
Original file line number Diff line number Diff line change @@ -13,8 +13,12 @@ public static partial class Argument
1313 /// <exception cref="ArgumentNullException"><paramref name="argument"/> is null.</exception>
1414 /// <exception cref="ArgumentException"><paramref name="argument"/> is empty or consists only of white-space characters.</exception>
1515 [ DebuggerStepThrough ]
16- [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
1716 [ StackTraceHidden ]
17+ #if NET8_0_OR_GREATER
18+ [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
19+ #else
20+ [ MethodImpl ( MethodImplOptions . NoInlining ) ]
21+ #endif
1822 public static void ThrowIfNullOrWhiteSpace (
1923 [ NotNull ] string ? argument ,
2024 [ CallerArgumentExpression ( nameof ( argument ) ) ] string ? paramName = null
You can’t perform that action at this time.
0 commit comments