Skip to content

Commit b9f468e

Browse files
committed
- Fix for services json input to use SDTs "JsonName"property
106788
1 parent 7968b35 commit b9f468e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dotnet/src/dotnetframework/GxClasses/Services/ReflectionHelper.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,18 @@ internal static object[] ProcessParametersForInvoke(MethodInfo methodInfo, IDict
259259

260260
string gxParameterName = GxParameterName(methodParameter.Name).ToLower();
261261
Type parmType = methodParameter.ParameterType;
262+
string jsontypename = "";
263+
object[] attributes = parmType.GetCustomAttributes(true);
264+
GxJsonName jsonName = (GxJsonName)attributes.Where(a => a.GetType() == typeof(GxJsonName)).FirstOrDefault();
265+
if (jsonName != null)
266+
jsontypename = jsonName.Name.ToLower();
267+
else
268+
jsontypename = gxParameterName;
262269
if (IsByRefParameter(methodParameter))
263270
{
264271
parmType = parmType.GetElementType();
265272
}
266-
if (parameters != null && parameters.TryGetValue(gxParameterName, out value))
273+
if (parameters != null && parameters.TryGetValue(jsontypename, out value))
267274
{
268275
if (value == null || JSONHelper.IsJsonNull(value))
269276
{

0 commit comments

Comments
 (0)