return ic.ToType(conversionType, provider);
}
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowCharOverflowException() { throw new OverflowException(SR.Overflow_Char); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowByteOverflowException() { throw new OverflowException(SR.Overflow_Byte); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowSByteOverflowException() { throw new OverflowException(SR.Overflow_SByte); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowInt16OverflowException() { throw new OverflowException(SR.Overflow_Int16); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowUInt16OverflowException() { throw new OverflowException(SR.Overflow_UInt16); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowInt32OverflowException() { throw new OverflowException(SR.Overflow_Int32); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowUInt32OverflowException() { throw new OverflowException(SR.Overflow_UInt32); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowInt64OverflowException() { throw new OverflowException(SR.Overflow_Int64); }
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowUInt64OverflowException() { throw new OverflowException(SR.Overflow_UInt64); }
// Conversions to Boolean
}
}
- // These exception throwing sites have been extracted into their own NoInlining methods
- // as these are uncommonly needed and when inlined are observed to prevent the inlining
- // of important methods like TryGetValue and ContainsKey.
+ // These exception throwing sites have been extracted into their own methods as these are
+ // uncommonly needed and when inlined are observed to prevent the inlining of important
+ // methods like TryGetValue and ContainsKey.
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowKeyNotFoundException(object key)
{
throw new KeyNotFoundException(SR.Format(SR.Arg_KeyNotFoundWithKey, key.ToString()));
}
- [MethodImpl(MethodImplOptions.NoInlining)]
private static void ThrowKeyNullException()
{
throw new ArgumentNullException("key");