-Refactored buffer pool

This commit is contained in:
James Newton-King
2015-12-13 15:40:37 +13:00
parent 4e2acac33a
commit 815b283e58
48 changed files with 187 additions and 186 deletions
@@ -407,7 +407,7 @@ namespace Newtonsoft.Json.Utilities
case ConvertResult.CannotConvertNull:
throw new Exception("Can not convert null {0} into non-nullable {1}.".FormatWith(CultureInfo.InvariantCulture, initialValue.GetType(), targetType));
case ConvertResult.NotInstantiableType:
throw new ArgumentException("Target type {0} is not a value type or a non-abstract class.".FormatWith(CultureInfo.InvariantCulture, targetType), "targetType");
throw new ArgumentException("Target type {0} is not a value type or a non-abstract class.".FormatWith(CultureInfo.InvariantCulture, targetType), nameof(targetType));
case ConvertResult.NoValidConversion:
throw new InvalidOperationException("Can not convert from {0} to {1}.".FormatWith(CultureInfo.InvariantCulture, initialValue.GetType(), targetType));
default:
@@ -438,7 +438,7 @@ namespace Newtonsoft.Json.Utilities
{
if (initialValue == null)
{
throw new ArgumentNullException("initialValue");
throw new ArgumentNullException(nameof(initialValue));
}
if (ReflectionUtils.IsNullableType(targetType))