Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Add IDictionary to ReadValue so that it's properly recognized.
Browse files Browse the repository at this point in the history
Based off report/patch/PR from FranciscoDA in #50
  • Loading branch information
garuma committed Dec 1, 2016
1 parent f167cad commit 2686c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Protocol/MessageReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public object ReadValue (Type type)
} else if (type == typeof (string)) {
readValueCache[type] = () => ReadString ();
return ReadString ();
} else if (type.IsGenericType && type.GetGenericTypeDefinition () == typeof (Dictionary<,>)) {
} else if (type.IsGenericType && (type.GetGenericTypeDefinition () == typeof (Dictionary<,>) || type.GetGenericTypeDefinition() == typeof(IDictionary<,>))) {
Type[] genArgs = type.GetGenericArguments ();
readValueCache[type] = () => ReadDictionary (genArgs[0], genArgs[1]);
return ReadDictionary (genArgs[0], genArgs[1]);
Expand Down

0 comments on commit 2686c4f

Please sign in to comment.