Skip to content

Commit c3dffa0

Browse files
RemoveAll delegation fixes.
1 parent 8a3bbc9 commit c3dffa0

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/libraries/Microsoft.PowerFx.Core/App/IExternalEnabledFeatures.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ internal interface IExternalEnabledFeatures
2121

2222
bool IsEnhancedComponentFunctionPropertyEnabled { get; }
2323

24-
bool IsComponentFunctionPropertyDataflowEnabled { get; }
25-
26-
bool IsRemoveAllDelegationEnabled { get; }
24+
bool IsComponentFunctionPropertyDataflowEnabled { get; }
2725
}
2826

2927
internal sealed class DefaultEnabledFeatures : IExternalEnabledFeatures
@@ -39,7 +37,5 @@ internal sealed class DefaultEnabledFeatures : IExternalEnabledFeatures
3937
public bool IsEnhancedComponentFunctionPropertyEnabled => true;
4038

4139
public bool IsComponentFunctionPropertyDataflowEnabled => true;
42-
43-
public bool IsRemoveAllDelegationEnabled => true;
4440
}
4541
}

src/libraries/Microsoft.PowerFx.Core/Public/Config/Features.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ public sealed class Features
8282
/// </summary>
8383
internal bool IsUserDefinedTypesEnabled { get; init; } = false;
8484

85+
/// <summary>
86+
/// Enables RemoveAll delegation.
87+
/// </summary>
88+
internal bool IsRemoveAllDelegationEnabled { get; init; }
89+
8590
internal static readonly Features None = new Features();
8691

8792
/// <summary>
@@ -124,6 +129,7 @@ internal Features(Features other)
124129
AsTypeLegacyCheck = other.AsTypeLegacyCheck;
125130
JsonFunctionAcceptsLazyTypes = other.JsonFunctionAcceptsLazyTypes;
126131
IsLookUpReductionDelegationEnabled = other.IsLookUpReductionDelegationEnabled;
132+
IsRemoveAllDelegationEnabled = other.IsRemoveAllDelegationEnabled;
127133
}
128134
}
129135
}

src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public override bool IsServerDelegatable(CallNode callNode, TexlBinding binding)
509509
}
510510

511511
// Use ECS flag as a guard.
512-
if (binding.Document != null && !binding.Document.Properties.EnabledFeatures.IsRemoveAllDelegationEnabled)
512+
if (!binding.Features.IsRemoveAllDelegationEnabled)
513513
{
514514
return false;
515515
}

0 commit comments

Comments
 (0)