Skip to content

Commit 18b8f7c

Browse files
claudiamurialdoclaudiamurialdo
andauthored
Minor improvement in understanding GxExternalCollection<T> (#1190)
* Change GXExternalCollection<T> to use a typed generic field internally, eliminating casts while preserving the existing public API. * Instance cannot be a strongly typed List<T> because the external type is unknown. What we do know is the type of the wrapper SDT, which is T. * Instance cannot be a strongly typed List<T> because the external type is unknown. * Minor comment. * Improve comment. --------- Co-authored-by: claudiamurialdo <c.murialdo@globant.com>
1 parent ab23ccf commit 18b8f7c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dotnet/src/dotnetframework/GxClasses/Domain/GxCollections.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2536,6 +2536,8 @@ public interface IGxExternalObject
25362536
}
25372537
public class GXExternalCollection<T> : IGxCollection where T : IGxExternalObject
25382538
{
2539+
// T represents the type of the SDT wrapper for the external instance. E.g SdtWorkflowUser
2540+
// Instance is a list of ExternalType, whose concrete type is unknown. E.g. GXflow.API.User
25392541
IList instance;
25402542

25412543
public string _containedType;
@@ -2572,7 +2574,7 @@ public int Add(object value)
25722574
else
25732575
return instance.Add(value);
25742576
}
2575-
public void Add(Object o, int idx)
2577+
public void Add(object o, int idx)
25762578
{
25772579
object exoValue;
25782580
IGxExternalObject x = o as IGxExternalObject;
@@ -2706,11 +2708,11 @@ public void AddObjectProperty(string name, object prop)
27062708
}
27072709
public string ToJSonString()
27082710
{
2709-
return "";
2711+
return string.Empty;
27102712
}
27112713
public string ToJSonString(bool includeState)
27122714
{
2713-
return "";
2715+
return string.Empty;
27142716
}
27152717
public bool FromJSonString(string s)
27162718
{

0 commit comments

Comments
 (0)