File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/UiPath.Workflow.Runtime Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,13 @@ namespace System.Activities;
1212public sealed class RuntimeArgument : LocationReference
1313{
1414 private static InternalEvaluationOrderComparer evaluationOrderComparer ;
15+ private static readonly ReadOnlyCollection < string > emptyOverloadGroups = new ( Array . Empty < string > ( ) ) ;
16+
1517 private Argument _boundArgument ;
1618 private readonly PropertyDescriptor _bindingProperty ;
1719 private readonly object _bindingPropertyOwner ;
1820 private List < string > _overloadGroupNames ;
21+ private ReadOnlyCollection < string > _overloadGroupNamesReadOnly ;
1922 private int _cacheId ;
2023 private readonly string _name ;
2124 private uint _nameHash ;
@@ -86,8 +89,19 @@ public ReadOnlyCollection<string> OverloadGroupNames
8689 {
8790 get
8891 {
89- _overloadGroupNames ??= new List < string > ( 0 ) ;
90- return new ReadOnlyCollection < string > ( _overloadGroupNames ) ;
92+ if ( _overloadGroupNamesReadOnly == null )
93+ {
94+ if ( _overloadGroupNames == null || _overloadGroupNames . Count == 0 )
95+ {
96+ _overloadGroupNamesReadOnly = emptyOverloadGroups ;
97+ }
98+ else
99+ {
100+ _overloadGroupNamesReadOnly = new ReadOnlyCollection < string > ( _overloadGroupNames ) ;
101+ }
102+ }
103+
104+ return _overloadGroupNamesReadOnly ;
91105 }
92106 }
93107
You can’t perform that action at this time.
0 commit comments