Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

using System.Collections.Generic;

namespace Microsoft.PowerFx.Core.App
{
internal interface IExternalDocumentProperties
Expand Down
11 changes: 9 additions & 2 deletions src/libraries/Microsoft.PowerFx.Core/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,10 @@ internal static class TexlStrings
public static StringGetter AboutClearCollect = (b) => StringResources.Get("AboutClearCollect", b);

public static StringGetter AboutRemove = (b) => StringResources.Get("AboutRemove", b);
public static StringGetter RemoveDataSourceArg = (b) => StringResources.Get("RemoveDataSourceArg", b);
public static StringGetter RemoveRecordsArg = (b) => StringResources.Get("RemoveRecordsArg", b);
public static StringGetter RemoveArg1 = (b) => StringResources.Get("RemoveArg1", b);
public static StringGetter RemoveArg2 = (b) => StringResources.Get("RemoveArg2", b);
public static StringGetter RemoveArg3 = (b) => StringResources.Get("RemoveArg3", b);
public static StringGetter RemoveAllArg2 = (b) => StringResources.Get("RemoveAllArg2", b);

public static StringGetter AboutDec2Hex = (b) => StringResources.Get("AboutDec2Hex", b);
public static StringGetter Dec2HexArg1 = (b) => StringResources.Get("Dec2HexArg1", b);
Expand Down Expand Up @@ -664,6 +666,7 @@ internal static class TexlStrings
public static ErrorResourceKey ErrBadSchema_AdditionalField = new ErrorResourceKey("ErrBadSchema_AdditionalField");
public static ErrorResourceKey ErrInvalidArgs_Func = new ErrorResourceKey("ErrInvalidArgs_Func");
public static ErrorResourceKey ErrNeedTable_Func = new ErrorResourceKey("ErrNeedTable_Func");
public static ErrorResourceKey ErrNeedTable_Arg = new ErrorResourceKey("ErrNeedTable_Arg");
public static ErrorResourceKey ErrNeedTableCol_Func = new ErrorResourceKey("ErrNeedTableCol_Func");
public static ErrorResourceKey ErrNotAccessibleInCurrentContext = new ErrorResourceKey("ErrNotAccessibleInCurrentContext");
public static ErrorResourceKey ErrInternalControlInInputProperty = new ErrorResourceKey("ErrInternalControlInInputProperty");
Expand Down Expand Up @@ -940,5 +943,9 @@ internal static class TexlStrings
public static ErrorResourceKey ErrJoinDottedNameleft = new ErrorResourceKey("ErrJoinDottedNameleft");
public static ErrorResourceKey ErrViolatedSimpleConstraintAccess = new ErrorResourceKey("ErrViolatedSimpleConstraintAccess");
public static ErrorResourceKey ErrViolatedSimpleConstraintFunction = new ErrorResourceKey("ErrViolatedSimpleConstraintFunction");

public static ErrorResourceKey ErrCollectionDoesNotAcceptThisType = new ErrorResourceKey("ErrCollectionDoesNotAcceptThisType");
public static ErrorResourceKey ErrNeedAll = new ErrorResourceKey("ErrNeedAll");
public static ErrorResourceKey ErrNeedCollection_Func = new ErrorResourceKey("ErrNeedCollection_Func");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ public sealed class Features
/// </summary>
internal bool IsUserDefinedTypesEnabled { get; init; } = false;

/// <summary>
/// Enables Remove All delegation.
/// </summary>
internal bool IsRemoveAllDelegationEnabled { get; init; }

internal static readonly Features None = new Features();

/// <summary>
Expand All @@ -97,7 +102,8 @@ public sealed class Features
PrimaryOutputPropertyCoercionDeprecated = true,
AsTypeLegacyCheck = false,
JsonFunctionAcceptsLazyTypes = true,
IsUserDefinedTypesEnabled = true
IsUserDefinedTypesEnabled = true,
IsRemoveAllDelegationEnabled = true
};

internal Features()
Expand All @@ -118,6 +124,7 @@ internal Features(Features other)
IsUserDefinedTypesEnabled = other.IsUserDefinedTypesEnabled;
AsTypeLegacyCheck = other.AsTypeLegacyCheck;
JsonFunctionAcceptsLazyTypes = other.JsonFunctionAcceptsLazyTypes;
IsRemoveAllDelegationEnabled = other.IsRemoveAllDelegationEnabled;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,13 @@ internal void AddFunction(TexlFunction function)
Inc();
_functions.Add(function);

if (EnumStoreBuilder == null)
{
_enumStoreBuilder = new EnumStoreBuilder();
}

// Add any associated enums
EnumStoreBuilder?.WithRequiredEnums(new TexlFunctionSet(function));
EnumStoreBuilder.WithRequiredEnums(new TexlFunctionSet(function));
}

internal EnumStoreBuilder EnumStoreBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public override async Task<DValue<BooleanValue>> RemoveAsync(IEnumerable<Formula
if (!found)
{
// https://github.com/microsoft/Power-Fx/issues/2618
errors.Add(new ExpressionError() { Message = "The specified record was not found.", Kind = ErrorKind.NotFound });
errors.Add(new ExpressionError() { Kind = ErrorKind.NotFound });
}
}

Expand Down
Loading