Skip to content

Commit

Permalink
- Fix for services json input to use SDTs "JsonName"property
Browse files Browse the repository at this point in the history
106788
  • Loading branch information
AlejandroP committed Jan 31, 2024
1 parent 7968b35 commit b9f468e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,18 @@ internal static object[] ProcessParametersForInvoke(MethodInfo methodInfo, IDict

string gxParameterName = GxParameterName(methodParameter.Name).ToLower();
Type parmType = methodParameter.ParameterType;
string jsontypename = "";
object[] attributes = parmType.GetCustomAttributes(true);
GxJsonName jsonName = (GxJsonName)attributes.Where(a => a.GetType() == typeof(GxJsonName)).FirstOrDefault();
if (jsonName != null)
jsontypename = jsonName.Name.ToLower();
else
jsontypename = gxParameterName;
if (IsByRefParameter(methodParameter))
{
parmType = parmType.GetElementType();
}
if (parameters != null && parameters.TryGetValue(gxParameterName, out value))
if (parameters != null && parameters.TryGetValue(jsontypename, out value))
{
if (value == null || JSONHelper.IsJsonNull(value))
{
Expand Down

0 comments on commit b9f468e

Please sign in to comment.