Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove NoInlining from ThrowHelpers.Throw* methods
  • Loading branch information
eiriktsarpalis committed Nov 23, 2021
commit d32b1e3350a330e89084f89babd64a0395a45f31
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,48 @@ namespace System.Text.Json
internal static partial class ThrowHelper
{
[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowArgumentException_NodeValueNotAllowed(string paramName)
{
throw new ArgumentException(SR.NodeValueNotAllowed, paramName);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowArgumentException_NodeArrayTooSmall(string paramName)
{
throw new ArgumentException(SR.NodeArrayTooSmall, paramName);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowArgumentOutOfRangeException_NodeArrayIndexNegative(string paramName)
{
throw new ArgumentOutOfRangeException(paramName, SR.NodeArrayIndexNegative);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowArgumentException_DuplicateKey(string propertyName)
{
throw new ArgumentException(SR.NodeDuplicateKey, propertyName);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowInvalidOperationException_NodeAlreadyHasParent()
{
throw new InvalidOperationException(SR.NodeAlreadyHasParent);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowInvalidOperationException_NodeCycleDetected()
{
throw new InvalidOperationException(SR.NodeCycleDetected);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowInvalidOperationException_NodeElementCannotBeObjectOrArray()
{
throw new InvalidOperationException(SR.NodeElementCannotBeObjectOrArray);
}

[DoesNotReturn]
[MethodImpl(MethodImplOptions.NoInlining)]
public static void ThrowNotSupportedException_NodeCollectionIsReadOnly()
{
throw GetNotSupportedException_NodeCollectionIsReadOnly();
Expand Down
Loading