Skip to content

Instantly share code, notes, and snippets.

@plioi
Created October 15, 2013 16:30
Show Gist options
  • Save plioi/6994443 to your computer and use it in GitHub Desktop.
Save plioi/6994443 to your computer and use it in GitHub Desktop.
Parameters(method =>
{
//Attempt to find a perfect matching source for N calls.
var parameters = method.GetParameters();
if (parameters.Length == 1)
return FindInputs(method.ReflectedType, parameters.Single().ParameterType);
//No matching source method, so call it once with with zero parameters.
return new[] { new object[] {} };
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment