Skip to content

Commit b52e752

Browse files
Rename FlattenSingleApiOutput to WrapSingleApiOutput
1 parent f99b23b commit b52e752

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dotnet/src/dotnetframework/GxClasses/Core/gxconfig.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,15 +1377,15 @@ public static int SessionTimeout {
13771377
return sessionTimeout;
13781378
}
13791379
}
1380-
const bool DefaultFlattenSingleApiOutput = true;
1381-
internal static bool FlattenSingleApiOutput
1380+
const bool DefaultWrapSingleApiOutput = false;
1381+
internal static bool WrapSingleApiOutput
13821382
{
13831383
get
13841384
{
1385-
if (Config.GetValueOf("FLATTEN_SINGLE_API_OUTPUT", out string flatten))
1385+
if (Config.GetValueOf("WRAP_SINGLE_API_OUTPUT", out string flatten))
13861386
return (int.TryParse(flatten, out int value) && value == 1);
13871387
else
1388-
return DefaultFlattenSingleApiOutput;
1388+
return DefaultWrapSingleApiOutput;
13891389
}
13901390
}
13911391
internal static string CorsAllowedOrigins()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ bool GetWrappedStatus(GXBaseObject worker, bool defaultWrapped, Dictionary<strin
353353
{
354354
if (outputParameters.Count == 1)
355355
{
356-
if ((originalParCount == 1) || (originalParCount > 1 && Preferences.FlattenSingleApiOutput))
356+
if ((originalParCount == 1) || (originalParCount > 1 && !Preferences.WrapSingleApiOutput))
357357
{
358358
wrapped = false;
359359
Object v = outputParameters.First().Value;
@@ -372,7 +372,7 @@ bool GetWrappedStatus(GXBaseObject worker, bool defaultWrapped, Dictionary<strin
372372
}
373373
}
374374
}
375-
if (originalParCount > 1 && !Preferences.FlattenSingleApiOutput)
375+
if (originalParCount > 1 && Preferences.WrapSingleApiOutput)
376376
{
377377
wrapped = true; //Ignore defaultWrapped parameter.
378378
}

0 commit comments

Comments
 (0)