We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46eaf77 commit 1114beaCopy full SHA for 1114bea
RestSharp.WinRT/Deserializers/JsonDeserializer.cs
@@ -21,7 +21,8 @@ public JsonDeserializer()
21
22
public object Deserialize(IRestResponse response, Type type)
23
{
24
- var methodInfo = this.GetType().GetRuntimeMethod("Deserialize", new Type[] { typeof(IRestResponse)} );
+ //Note: I think using GetRuntimeMethod here doesnt work because it only finds public members, so we have to be more brute force
25
+ var methodInfo = this.GetType().GetTypeInfo().DeclaredMethods.Where(m => m.Name == "Deserialize" && m.IsGenericMethod).FirstOrDefault();
26
var genericMethod = methodInfo.MakeGenericMethod(type);
27
var result = genericMethod.Invoke(this, new object[] { response });
28
0 commit comments