Skip to content

Commit 9abf381

Browse files
authored
Remove NoInliningAttribute for Throw methods (#385)
1 parent 40a2e76 commit 9abf381

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

NetFabric.Hyperlinq/Utils/Throw.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,102 +8,82 @@ namespace NetFabric.Hyperlinq
88
static class Throw
99
{
1010
[DoesNotReturn]
11-
[MethodImpl(MethodImplOptions.NoInlining)]
1211
public static void ArgumentArraySegmentNullException(string paramName)
1312
=> throw new ArgumentException(paramName: paramName, message: Resource.ArraySegmentNull);
1413

1514
[DoesNotReturn]
16-
[MethodImpl(MethodImplOptions.NoInlining)]
1715
public static void ArgumentException(string paramName, string? message = default)
1816
=> throw new ArgumentException(paramName: paramName, message: message);
1917

2018
[DoesNotReturn]
21-
[MethodImpl(MethodImplOptions.NoInlining)]
2219
public static void ArgumentNullException(string paramName, string? message = default)
2320
=> throw new ArgumentNullException(paramName: paramName, message: message);
2421

2522
[DoesNotReturn]
26-
[MethodImpl(MethodImplOptions.NoInlining)]
2723
public static T ArgumentNullException<T>(string paramName, string? message = default)
2824
=> throw new ArgumentNullException(paramName: paramName, message: message);
2925

3026
[DoesNotReturn]
31-
[MethodImpl(MethodImplOptions.NoInlining)]
3227
public static ref readonly T ArgumentNullExceptionRef<T>(string paramName, string? message = default)
3328
=> throw new ArgumentNullException(paramName: paramName, message: message);
3429

3530
[DoesNotReturn]
36-
[MethodImpl(MethodImplOptions.NoInlining)]
3731
public static void ArgumentOutOfRangeException(string paramName, string? message = default)
3832
=> throw new ArgumentOutOfRangeException(paramName: paramName, message: message);
3933

4034
[DoesNotReturn]
41-
[MethodImpl(MethodImplOptions.NoInlining)]
4235
public static T ArgumentOutOfRangeException<T>(string paramName, string? message = default)
4336
=> throw new ArgumentOutOfRangeException(paramName: paramName, message: message);
4437

4538
[DoesNotReturn]
46-
[MethodImpl(MethodImplOptions.NoInlining)]
4739
public static ref readonly T ArgumentOutOfRangeExceptionRef<T>(string paramName, string? message = default)
4840
=> throw new ArgumentOutOfRangeException(paramName: paramName, message: message);
4941

5042
[DoesNotReturn]
51-
[MethodImpl(MethodImplOptions.NoInlining)]
5243
public static void EmptySequence()
5344
=> throw new InvalidOperationException(Resource.EmptySequence);
5445

5546
[DoesNotReturn]
56-
[MethodImpl(MethodImplOptions.NoInlining)]
5747
public static T EmptySequence<T>()
5848
=> throw new InvalidOperationException(Resource.EmptySequence);
5949

6050
[DoesNotReturn]
61-
[MethodImpl(MethodImplOptions.NoInlining)]
6251
public static ref readonly T EmptySequenceRef<T>()
6352
=> throw new InvalidOperationException(Resource.EmptySequence);
6453

6554
[DoesNotReturn]
66-
[MethodImpl(MethodImplOptions.NoInlining)]
6755
public static void NotSingleSequence()
6856
=> throw new InvalidOperationException(Resource.NotSingleSequence);
6957

7058
[DoesNotReturn]
71-
[MethodImpl(MethodImplOptions.NoInlining)]
7259
public static T NotSingleSequence<T>()
7360
=> throw new InvalidOperationException(Resource.NotSingleSequence);
7461

7562
[DoesNotReturn]
76-
[MethodImpl(MethodImplOptions.NoInlining)]
7763
public static ref readonly T NotSingleSequenceRef<T>()
7864
=> throw new InvalidOperationException(Resource.NotSingleSequence);
7965

8066
[DoesNotReturn]
81-
[MethodImpl(MethodImplOptions.NoInlining)]
8267
public static void InvalidOperationException(string? message = default)
8368
=> throw new InvalidOperationException(message);
8469

8570
[DoesNotReturn]
86-
[MethodImpl(MethodImplOptions.NoInlining)]
8771
public static T InvalidOperationException<T>()
8872
=> throw new InvalidOperationException();
8973

9074
[DoesNotReturn]
91-
[MethodImpl(MethodImplOptions.NoInlining)]
9275
public static void NotSupportedException()
9376
=> throw new NotSupportedException();
9477

9578
[DoesNotReturn]
96-
[MethodImpl(MethodImplOptions.NoInlining)]
9779
public static T NotSupportedException<T>()
9880
=> throw new NotSupportedException();
9981

10082
[DoesNotReturn]
101-
[MethodImpl(MethodImplOptions.NoInlining)]
10283
public static void ObjectDisposedException(string objectName)
10384
=> throw new ObjectDisposedException(objectName);
10485

10586
[DoesNotReturn]
106-
[MethodImpl(MethodImplOptions.NoInlining)]
10787
public static T ObjectDisposedException<T>(string objectName)
10888
=> throw new ObjectDisposedException(objectName);
10989
}

0 commit comments

Comments
 (0)