Skip to content

Spellchecking #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
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
26 changes: 13 additions & 13 deletions src/SimpleJson/SimpleJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
// usually already defined in properties
//#define NETFX_CORE;

// If you are targetting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO;
// If you are targeting WinStore, WP8 and NET4.5+ PCL make sure to #define SIMPLE_JSON_TYPEINFO;

// original json parsing code from http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html

Expand Down Expand Up @@ -352,7 +352,7 @@ public override string ToString()
/// <param name="binder">Provides information about the conversion operation. The binder.Type property provides the type to which the object must be converted. For example, for the statement (String)sampleObject in C# (CType(sampleObject, Type) in Visual Basic), where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, binder.Type returns the <see cref="T:System.String"/> type. The binder.Explicit property provides information about the kind of conversion that occurs. It returns true for explicit conversion and false for implicit conversion.</param>
/// <param name="result">The result of the type conversion operation.</param>
/// <returns>
/// Alwasy returns true.
/// Always returns true.
/// </returns>
public override bool TryConvert(ConvertBinder binder, out object result)
{
Expand All @@ -379,7 +379,7 @@ public override bool TryConvert(ConvertBinder binder, out object result)
/// </summary>
/// <param name="binder">Provides information about the deletion.</param>
/// <returns>
/// Alwasy returns true.
/// Always returns true.
/// </returns>
public override bool TryDeleteMember(DeleteMemberBinder binder)
{
Expand All @@ -397,7 +397,7 @@ public override bool TryDeleteMember(DeleteMemberBinder binder)
/// <param name="indexes">The indexes that are used in the operation. For example, for the sampleObject[3] operation in C# (sampleObject(3) in Visual Basic), where sampleObject is derived from the DynamicObject class, <paramref name="indexes"/> is equal to 3.</param>
/// <param name="result">The result of the index operation.</param>
/// <returns>
/// Alwasy returns true.
/// Always returns true.
/// </returns>
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
Expand All @@ -417,7 +417,7 @@ public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out ob
/// <param name="binder">Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member on which the dynamic operation is performed. For example, for the Console.WriteLine(sampleObject.SampleProperty) statement, where sampleObject is an instance of the class derived from the <see cref="T:System.Dynamic.DynamicObject"/> class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.</param>
/// <param name="result">The result of the get operation. For example, if the method is called for a property, you can assign the property value to <paramref name="result"/>.</param>
/// <returns>
/// Alwasy returns true.
/// Always returns true.
/// </returns>
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
Expand Down Expand Up @@ -554,7 +554,7 @@ public static object DeserializeObject(string json)
/// The object.
/// </param>
/// <returns>
/// Returns true if successfull otherwise false.
/// Returns true if successful otherwise false.
/// </returns>
[SuppressMessage("Microsoft.Design", "CA1007:UseGenericsWhereAppropriate", Justification="Need to support .NET 2")]
public static bool TryDeserializeObject(string json, out object obj)
Expand Down Expand Up @@ -1260,7 +1260,7 @@ class PocoJsonSerializerStrategy : IJsonSerializerStrategy

public PocoJsonSerializerStrategy()
{
ConstructorCache = new ReflectionUtils.ThreadSafeDictionary<Type, ReflectionUtils.ConstructorDelegate>(ContructorDelegateFactory);
ConstructorCache = new ReflectionUtils.ThreadSafeDictionary<Type, ReflectionUtils.ConstructorDelegate>(ConstructorDelegateFactory);
GetCache = new ReflectionUtils.ThreadSafeDictionary<Type, IDictionary<string, ReflectionUtils.GetDelegate>>(GetterValueFactory);
SetCache = new ReflectionUtils.ThreadSafeDictionary<Type, IDictionary<string, KeyValuePair<Type, ReflectionUtils.SetDelegate>>>(SetterValueFactory);
}
Expand All @@ -1270,9 +1270,9 @@ protected virtual string MapClrMemberNameToJsonFieldName(string clrPropertyName)
return clrPropertyName;
}

internal virtual ReflectionUtils.ConstructorDelegate ContructorDelegateFactory(Type key)
internal virtual ReflectionUtils.ConstructorDelegate ConstructorDelegateFactory(Type key)
{
return ReflectionUtils.GetContructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes);
return ReflectionUtils.GetConstructor(key, key.IsArray ? ArrayConstructorParameterTypes : EmptyTypes);
}

internal virtual IDictionary<string, ReflectionUtils.GetDelegate> GetterValueFactory(Type type)
Expand Down Expand Up @@ -1447,7 +1447,7 @@ public virtual object DeserializeObject(object value, Type type)
foreach (object o in jsonObject)
list[i++] = DeserializeObject(o, type.GetElementType());
}
else if (ReflectionUtils.IsTypeGenericeCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type))
else if (ReflectionUtils.IsTypeGenericCollectionInterface(type) || ReflectionUtils.IsAssignableFrom(typeof(IList), type))
{
Type innerType = ReflectionUtils.GetGenericListElementType(type);
list = (IList)(ConstructorCache[type] ?? ConstructorCache[typeof(List<>).MakeGenericType(innerType)])(jsonObject.Count);
Expand Down Expand Up @@ -1685,7 +1685,7 @@ public static bool IsTypeGeneric(Type type)
return GetTypeInfo(type).IsGenericType;
}

public static bool IsTypeGenericeCollectionInterface(Type type)
public static bool IsTypeGenericCollectionInterface(Type type)
{
if (!IsTypeGeneric(type))
return false;
Expand Down Expand Up @@ -1812,7 +1812,7 @@ public static MethodInfo GetSetterMethodInfo(PropertyInfo propertyInfo)
#endif
}

public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo)
public static ConstructorDelegate GetConstructor(ConstructorInfo constructorInfo)
{
#if SIMPLE_JSON_NO_LINQ_EXPRESSION
return GetConstructorByReflection(constructorInfo);
Expand All @@ -1821,7 +1821,7 @@ public static ConstructorDelegate GetContructor(ConstructorInfo constructorInfo)
#endif
}

public static ConstructorDelegate GetContructor(Type type, params Type[] argsType)
public static ConstructorDelegate GetConstructor(Type type, params Type[] argsType)
{
#if SIMPLE_JSON_NO_LINQ_EXPRESSION
return GetConstructorByReflection(type, argsType);
Expand Down