Skip to content

Commit ec787d7

Browse files
committed
Fixes based on Review Comments
1 parent f80752a commit ec787d7

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

src/MsgPack/Serialization/BindingOptions.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,24 @@ public IEnumerable<string> GetIgnoringMembers( Type targetType )
7777
}
7878
}
7979
}
80+
81+
/// <summary>
82+
/// Gets all registered types specific ignoring members.
83+
/// </summary>
84+
/// <returns>Returns all registered types specific ignoring members.</returns>
85+
public IReadOnlyDictionary<Type, IEnumerable<string>> GetAllIgnoringMembers()
86+
{
87+
Dictionary<Type, IEnumerable<string>> map = new Dictionary<Type, IEnumerable<string>>();
88+
lock ( this.typeIgnoringMembersMap )
89+
{
90+
foreach ( var item in this.typeIgnoringMembersMap )
91+
{
92+
//// These to make sure that Property list doesn't used as reference type.
93+
map.Add( item.Key, item.Value.ToArray() );
94+
}
95+
}
96+
97+
return map;
98+
}
8099
}
81100
}

src/MsgPack/Serialization/SerializationTarget.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -639,13 +639,14 @@ private static bool CheckTargetEligibility( SerializationContext context, Member
639639
{
640640
case CollectionKind.Array:
641641
case CollectionKind.Map:
642-
{
643-
return traits.AddMethod != null;
644-
}
642+
{
643+
return traits.AddMethod != null;
644+
}
645+
645646
default:
646-
{
647-
return false;
648-
}
647+
{
648+
return false;
649+
}
649650
}
650651
}
651652

0 commit comments

Comments
 (0)