Closed Xiot closed 10 years ago
Thank you for reporting this.
ToString
is required because the parameter value might not be a string; it might as well be an integer, or a complex object. If removing ToString
solved your problem, my guess is that in your case, the parameter was already a string.
Given that a parameter could be of any type, it's unclear to me how to handle this scenario. Perhaps inserting null
into the resulting dictionary would be OK, because the Web API infrastructure would be able to handle this automatically, but I haven't looked into this yet.
This should now be resolved. It's live as Hyprlinkr 1.0.1.
ScalarRouteValueQuery throws a NullReferenceException on line 109 (
var value = lambda.Compile().DynamicInvoke().ToString();
) when you passnull
for the value of one of the parameters. In my limited testing, removing theToString
got around the issue although I didn't look into why theToString
was there in the first place.