Skip to content

Commit

Permalink
Merge pull request #397 from AArnott/cleanup
Browse files Browse the repository at this point in the history
Typo cleanup
  • Loading branch information
neuecc committed Feb 26, 2019
2 parents 5d4086a + 006a423 commit 91bfb7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.

This file was deleted.

10 changes: 5 additions & 5 deletions src/MessagePack/Resolvers/DynamicObjectResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public static object BuildFormatterToDynamicMethod(Type type, bool forceStringKe
}
foreach (var item in serializationInfo.Members.Where(x => x.IsReadable))
{
var attr = item.GetMessagePackFormatterAttribtue();
var attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
var formatter = Activator.CreateInstance(attr.FormatterType, attr.Arguments);
Expand All @@ -430,7 +430,7 @@ public static object BuildFormatterToDynamicMethod(Type type, bool forceStringKe
}
foreach (var item in serializationInfo.Members) // not only for writable because for use ctor.
{
var attr = item.GetMessagePackFormatterAttribtue();
var attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
var formatter = Activator.CreateInstance(attr.FormatterType, attr.Arguments);
Expand Down Expand Up @@ -520,7 +520,7 @@ static void BuildConstructor(Type type, ObjectSerializationInfo info, Constructo
Dictionary<ObjectSerializationInfo.EmittableMember, FieldInfo> dict = new Dictionary<ObjectSerializationInfo.EmittableMember, FieldInfo>();
foreach (var item in info.Members.Where(x => x.IsReadable || x.IsWritable))
{
var attr = item.GetMessagePackFormatterAttribtue();
var attr = item.GetMessagePackFormatterAttribute();
if (attr != null)
{
var f = builder.DefineField(item.Name + "_formatter", attr.FormatterType, FieldAttributes.Private | FieldAttributes.InitOnly);
Expand Down Expand Up @@ -1759,7 +1759,7 @@ public bool IsValueType
}
}

public MessagePackFormatterAttribute GetMessagePackFormatterAttribtue()
public MessagePackFormatterAttribute GetMessagePackFormatterAttribute()
{
if (IsProperty)
{
Expand Down Expand Up @@ -1844,4 +1844,4 @@ public MessagePackDynamicObjectResolverException(string message)
}

#endif
#endif
#endif
10 changes: 5 additions & 5 deletions src/MessagePack/Resolvers/TypelessObjectResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ static class Helper
{typeof(UInt64), ForceUInt64BlockFormatter.Instance},
{typeof(byte), ForceByteBlockFormatter.Instance},
{typeof(sbyte), ForceSByteBlockFormatter.Instance},
// Nulllable Primitive

// Nullable Primitive
{typeof(Nullable<Int16>), NullableForceInt16BlockFormatter.Instance},
{typeof(Nullable<Int32>), NullableForceInt32BlockFormatter.Instance},
{typeof(Nullable<Int64>), NullableForceInt64BlockFormatter.Instance},
Expand All @@ -91,8 +91,8 @@ static class Helper
{typeof(Nullable<UInt64>), NullableForceUInt64BlockFormatter.Instance},
{typeof(Nullable<byte>), NullableForceByteBlockFormatter.Instance},
{typeof(Nullable<sbyte>), NullableForceSByteBlockFormatter.Instance},
// otpmitized primitive array formatter

// optimized primitive array formatter
{typeof(Int16[]), ForceInt16BlockArrayFormatter.Instance},
{typeof(Int32[]), ForceInt32BlockArrayFormatter.Instance},
{typeof(Int64[]), ForceInt64BlockArrayFormatter.Instance},
Expand Down Expand Up @@ -145,4 +145,4 @@ static FormatterCache()
}

#endif
}
}

0 comments on commit 91bfb7a

Please sign in to comment.