Created
August 4, 2020 04:47
-
-
Save chadmichel/eed23d267a253fdd53d948e0d5170dc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Map parameters on method to data from JSON | |
var parameterList = new List<object>(); | |
foreach (var parameterInfo in methodInfo.GetParameters()) | |
{ | |
var helpObj = Activator.CreateInstance(parameterInfo.ParameterType); | |
help.Add(helpObj); | |
var pJson = parameters[parameterInfo.Name] as JObject; | |
var pObj = pJson.ToObject(parameterInfo.ParameterType); | |
parameterList.Add(pObj); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment