@@ -139,7 +139,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
break;
|
||||
}
|
||||
|
||||
// incase we can't find an exact match, use first inexact
|
||||
// in case we can't find an exact match, use first inexact
|
||||
if (match == null)
|
||||
{
|
||||
if (parameterType.IsAssignableFrom(constructorArgumentType))
|
||||
|
||||
@@ -1150,7 +1150,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
}
|
||||
else
|
||||
{
|
||||
// normal postive exponent case
|
||||
// normal positive exponent case
|
||||
val = ((ulong)exp << 52) | ((val >> 11) & 0x000FFFFFFFFFFFFF);
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
|
||||
if (!enumType.IsEnum())
|
||||
{
|
||||
throw new ArgumentException("Type {0} is not an Enum.".FormatWith(CultureInfo.InvariantCulture, enumType), nameof(enumType));
|
||||
throw new ArgumentException("Type {0} is not an enum.".FormatWith(CultureInfo.InvariantCulture, enumType.Name), nameof(enumType));
|
||||
}
|
||||
|
||||
IList<object> enumValues = GetValues(enumType);
|
||||
@@ -143,7 +143,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
catch (OverflowException e)
|
||||
{
|
||||
throw new InvalidOperationException(
|
||||
string.Format(CultureInfo.InvariantCulture, "Value from enum with the underlying type of {0} cannot be added to dictionary with a value type of {1}. Value was too large: {2}",
|
||||
"Value from enum with the underlying type of {0} cannot be added to dictionary with a value type of {1}. Value was too large: {2}".FormatWith(CultureInfo.InvariantCulture,
|
||||
Enum.GetUnderlyingType(enumType), typeof(TUnderlyingType), Convert.ToUInt64(enumValues[i], CultureInfo.InvariantCulture)), e);
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
{
|
||||
if (!enumType.IsEnum())
|
||||
{
|
||||
throw new ArgumentException("Type '" + enumType.Name + "' is not an enum.");
|
||||
throw new ArgumentException("Type {0} is not an enum.".FormatWith(CultureInfo.InvariantCulture, enumType.Name), nameof(enumType));
|
||||
}
|
||||
|
||||
List<object> values = new List<object>();
|
||||
@@ -173,7 +173,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
{
|
||||
if (!enumType.IsEnum())
|
||||
{
|
||||
throw new ArgumentException("Type '" + enumType.Name + "' is not an enum.");
|
||||
throw new ArgumentException("Type {0} is not an enum.".FormatWith(CultureInfo.InvariantCulture, enumType.Name), nameof(enumType));
|
||||
}
|
||||
|
||||
List<string> values = new List<string>();
|
||||
|
||||
@@ -1332,7 +1332,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
|
||||
IEnumerable<TSource> second,
|
||||
IEqualityComparer<TSource> comparer)
|
||||
{
|
||||
CheckNotNull(first, "frist");
|
||||
CheckNotNull(first, "first");
|
||||
CheckNotNull(second, "second");
|
||||
|
||||
comparer = comparer ?? EqualityComparer<TSource>.Default;
|
||||
@@ -1704,7 +1704,7 @@ namespace Newtonsoft.Json.Utilities.LinqBridge
|
||||
// ToDictionary is meant to throw ArgumentNullException if
|
||||
// keySelector produces a key that is null and
|
||||
// Argument exception if keySelector produces duplicate keys
|
||||
// for two elements. Incidentally, the doucmentation for
|
||||
// for two elements. Incidentally, the documentation for
|
||||
// IDictionary<TKey, TValue>.Add says that the Add method
|
||||
// throws the same exceptions under the same circumstances
|
||||
// so we don't need to do any additional checking or work
|
||||
|
||||
@@ -530,7 +530,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
throw new ArgumentException("MemberInfo '{0}' has index parameters".FormatWith(CultureInfo.InvariantCulture, member.Name), e);
|
||||
}
|
||||
default:
|
||||
throw new ArgumentException("MemberInfo '{0}' is not of type FieldInfo or PropertyInfo".FormatWith(CultureInfo.InvariantCulture, CultureInfo.InvariantCulture, member.Name), nameof(member));
|
||||
throw new ArgumentException("MemberInfo '{0}' is not of type FieldInfo or PropertyInfo".FormatWith(CultureInfo.InvariantCulture, member.Name), nameof(member));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -983,7 +983,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
|
||||
GetChildPrivateProperties(propertyInfos, targetType, bindingAttr);
|
||||
|
||||
// a base class private getter/setter will be inaccessable unless the property was gotten from the base class
|
||||
// a base class private getter/setter will be inaccessible unless the property was gotten from the base class
|
||||
for (int i = 0; i < propertyInfos.Count; i++)
|
||||
{
|
||||
PropertyInfo member = propertyInfos[i];
|
||||
|
||||
Reference in New Issue
Block a user