Skip to content

Commit 4619d74

Browse files
Fixing delegable feature.
1 parent d2a778f commit 4619d74

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ internal interface IExternalEnabledFeatures
2121

2222
bool IsEnhancedComponentFunctionPropertyEnabled { get; }
2323

24-
bool IsComponentFunctionPropertyDataflowEnabled { get; }
24+
bool IsComponentFunctionPropertyDataflowEnabled { get; }
25+
26+
bool IsRemoveAllDelegationEnabled { get; }
2527
}
2628

2729
internal sealed class DefaultEnabledFeatures : IExternalEnabledFeatures
@@ -36,6 +38,8 @@ internal sealed class DefaultEnabledFeatures : IExternalEnabledFeatures
3638

3739
public bool IsEnhancedComponentFunctionPropertyEnabled => true;
3840

39-
public bool IsComponentFunctionPropertyDataflowEnabled => true;
41+
public bool IsComponentFunctionPropertyDataflowEnabled => true;
42+
43+
public bool IsRemoveAllDelegationEnabled => true;
4044
}
4145
}

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

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

95-
/// <summary>
96-
/// Enables Remove All delegation.
97-
/// </summary>
98-
internal bool IsRemoveAllDelegationEnabled { get; set; }
99-
10095
internal static readonly Features None = new Features();
10196

10297
/// <summary>

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,12 +509,9 @@ public override bool IsServerDelegatable(CallNode callNode, TexlBinding binding)
509509
}
510510

511511
// Use ECS flag as a guard.
512-
if (binding.Document != null)
512+
if (binding.Document != null && !binding.Document.Properties.EnabledFeatures.IsRemoveAllDelegationEnabled)
513513
{
514-
if (!binding.Features.IsRemoveAllDelegationEnabled)
515-
{
516-
return false;
517-
}
514+
return false;
518515
}
519516

520517
if (!binding.TryGetDataSourceInfo(callNode.Args.Children[0], out IExternalDataSource dataSource))

0 commit comments

Comments
 (0)