From 9abf381ca277d0934bd810bc946e443d203106e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=A3o=20Almada?= Date: Mon, 27 Sep 2021 19:46:40 +0100 Subject: [PATCH] Remove NoInliningAttribute for Throw methods (#385) --- NetFabric.Hyperlinq/Utils/Throw.cs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/NetFabric.Hyperlinq/Utils/Throw.cs b/NetFabric.Hyperlinq/Utils/Throw.cs index 7fda0a64..8b8ad307 100644 --- a/NetFabric.Hyperlinq/Utils/Throw.cs +++ b/NetFabric.Hyperlinq/Utils/Throw.cs @@ -8,102 +8,82 @@ namespace NetFabric.Hyperlinq static class Throw { [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void ArgumentArraySegmentNullException(string paramName) => throw new ArgumentException(paramName: paramName, message: Resource.ArraySegmentNull); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void ArgumentException(string paramName, string? message = default) => throw new ArgumentException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void ArgumentNullException(string paramName, string? message = default) => throw new ArgumentNullException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T ArgumentNullException(string paramName, string? message = default) => throw new ArgumentNullException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static ref readonly T ArgumentNullExceptionRef(string paramName, string? message = default) => throw new ArgumentNullException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void ArgumentOutOfRangeException(string paramName, string? message = default) => throw new ArgumentOutOfRangeException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T ArgumentOutOfRangeException(string paramName, string? message = default) => throw new ArgumentOutOfRangeException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static ref readonly T ArgumentOutOfRangeExceptionRef(string paramName, string? message = default) => throw new ArgumentOutOfRangeException(paramName: paramName, message: message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void EmptySequence() => throw new InvalidOperationException(Resource.EmptySequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T EmptySequence() => throw new InvalidOperationException(Resource.EmptySequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static ref readonly T EmptySequenceRef() => throw new InvalidOperationException(Resource.EmptySequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void NotSingleSequence() => throw new InvalidOperationException(Resource.NotSingleSequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T NotSingleSequence() => throw new InvalidOperationException(Resource.NotSingleSequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static ref readonly T NotSingleSequenceRef() => throw new InvalidOperationException(Resource.NotSingleSequence); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void InvalidOperationException(string? message = default) => throw new InvalidOperationException(message); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T InvalidOperationException() => throw new InvalidOperationException(); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void NotSupportedException() => throw new NotSupportedException(); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T NotSupportedException() => throw new NotSupportedException(); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static void ObjectDisposedException(string objectName) => throw new ObjectDisposedException(objectName); [DoesNotReturn] - [MethodImpl(MethodImplOptions.NoInlining)] public static T ObjectDisposedException(string objectName) => throw new ObjectDisposedException(objectName); }