From b5e62cd0beb6d0d0a1bb0895921b2a4b32eed88b Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 14:57:19 +0000 Subject: [PATCH 1/8] Push to fork --- .../Types/FunctionCategories.cs | 2 +- .../AssemblyProperties.cs | 3 +++ .../ReflectionFunction.cs | 22 ++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index dad4feb5e8..e3755ffd1e 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -8,7 +8,7 @@ namespace Microsoft.PowerFx.Core.Types { [Flags] [TransportType(TransportKind.Enum)] - internal enum FunctionCategories : uint + public enum FunctionCategories : uint { None = 0x0, Text = 0x1, diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs index e38a3d5544..212cbda780 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs @@ -5,3 +5,6 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Interpreter.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.PowerFx.Connectors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] + +// PiFlows Server +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs b/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs index 4229f1ab04..36a39c4d41 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs @@ -44,6 +44,26 @@ public CustomTexlFunction(string name, DType returnType, params DType[] paramTyp { } + protected CustomTexlFunction( + string name, + string description, + FunctionCategories functionCategories, + FormulaType returnType, + params FormulaType[] paramTypes) + : base( + DPath.Root, + name, + name, + SG(description), + functionCategories, + returnType._type, + 0, + paramTypes.Length, + paramTypes.Length, + Array.ConvertAll(paramTypes, p => p._type)) + { + } + public override bool IsSelfContained => true; public static StringGetter SG(string text) @@ -136,7 +156,7 @@ public async Task InvokeAsync(FormulaValue[] args, CancellationTok return await result; } } - + /// /// Base class for importing a C# function into Power Fx. /// Dervied class should follow this convention: From 6fcd00f47c317f152bd74104c1c503f4685785b1 Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 16:44:14 +0000 Subject: [PATCH 2/8] Internals visible to PiFlow.Server --- src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs index 2f807e13e8..505025fcc2 100644 --- a/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs @@ -44,3 +44,6 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + +// PiFlows Server +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file From 70682f536ee4ef9fc2dcfd03f02286d9444f8a27 Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 16:50:43 +0000 Subject: [PATCH 3/8] Updated FunctionCategories with PiFlow support --- .../Microsoft.PowerFx.Core/Types/FunctionCategories.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index e3755ffd1e..ce822c7c7d 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -20,6 +20,7 @@ public enum FunctionCategories : uint Information = 0x40, Color = 0x80, REST = 0x100, - Component = 0x200 + Component = 0x200, + PiFlow = 0x400 } } From c34df8b341e365f26ab2a28b3f861a1fc969ec1e Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Sun, 5 Mar 2023 19:56:18 +0000 Subject: [PATCH 4/8] Before pull from main --- src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs | 6 +++++- .../Microsoft.PowerFx.Core/Types/FunctionCategories.cs | 2 ++ .../Microsoft.PowerFx.Interpreter/AssemblyProperties.cs | 2 +- .../Microsoft.PowerFx.Interpreter/ParsedExpression.cs | 5 +++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs b/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs index c0f66070ee..56d814a3ec 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs @@ -240,12 +240,14 @@ internal TexlBinding Binding } } +#pragma warning disable CS1574, CS1584, CS1581, CS1580 /// /// List of all errors and warnings. Check . /// This can include Parse, Bind, and per-engine custom errors (see , /// or any custom errors passes explicit to the ctor. /// Not null, but empty on success. /// +#pragma warning restore CS1574, CS1584, CS1581, CS1580 public IEnumerable Errors { get => GetErrorsInLocale(null); @@ -450,12 +452,14 @@ public void ApplyDependencyAnalysis() // Flag to ensure Post Checks are only invoked once. private bool _invokingPostCheck; - + +#pragma warning disable CS1574, CS1584, CS1581, CS1580 /// /// Calculate all errors. /// Invoke Binding and any engine-specific errors via . /// /// +#pragma warning restore CS1574, CS1584, CS1581, CS1580 public IEnumerable ApplyErrors() { if (!_invokingPostCheck) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index ce822c7c7d..ab82faddde 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -8,7 +8,9 @@ namespace Microsoft.PowerFx.Core.Types { [Flags] [TransportType(TransportKind.Enum)] +#pragma warning disable CA1028 public enum FunctionCategories : uint +#pragma warning restore CA1028 { None = 0x0, Text = 0x1, diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs index 212cbda780..22fa4aa6a6 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs @@ -7,4 +7,4 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Connectors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] // PiFlows Server -[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs b/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs index fde3ff2084..616c02e7d0 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs @@ -19,6 +19,8 @@ namespace Microsoft.PowerFx /// public interface IExpressionEvaluator { + ReadOnlySymbolValues NewFromRecordValue(RecordValue recordValue = null); + public Task EvalAsync(CancellationToken cancellationToken, IRuntimeConfig runtimeConfig = null); } @@ -137,6 +139,9 @@ async Task IExpression.EvalAsync(RecordValue parameters, Cancellat } } + public ReadOnlySymbolValues NewFromRecordValue(RecordValue recordValue = null) => + ReadOnlySymbolValues.NewFromRecord(_parameterSymbolTable, recordValue); + public async Task EvalAsync(CancellationToken cancellationToken, IRuntimeConfig runtimeConfig = null) { ReadOnlySymbolValues symbolValues = ComposedReadOnlySymbolValues.New( From a6a040b25928e91783f339b0405b8dd8353b1b69 Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 14:57:19 +0000 Subject: [PATCH 5/8] Push to fork --- .../Types/FunctionCategories.cs | 2 +- .../AssemblyProperties.cs | 3 +++ .../ReflectionFunction.cs | 22 ++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index dad4feb5e8..e3755ffd1e 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -8,7 +8,7 @@ namespace Microsoft.PowerFx.Core.Types { [Flags] [TransportType(TransportKind.Enum)] - internal enum FunctionCategories : uint + public enum FunctionCategories : uint { None = 0x0, Text = 0x1, diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs index e38a3d5544..212cbda780 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs @@ -5,3 +5,6 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Interpreter.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.PowerFx.Connectors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] + +// PiFlows Server +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs b/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs index 4229f1ab04..36a39c4d41 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/ReflectionFunction.cs @@ -44,6 +44,26 @@ public CustomTexlFunction(string name, DType returnType, params DType[] paramTyp { } + protected CustomTexlFunction( + string name, + string description, + FunctionCategories functionCategories, + FormulaType returnType, + params FormulaType[] paramTypes) + : base( + DPath.Root, + name, + name, + SG(description), + functionCategories, + returnType._type, + 0, + paramTypes.Length, + paramTypes.Length, + Array.ConvertAll(paramTypes, p => p._type)) + { + } + public override bool IsSelfContained => true; public static StringGetter SG(string text) @@ -136,7 +156,7 @@ public async Task InvokeAsync(FormulaValue[] args, CancellationTok return await result; } } - + /// /// Base class for importing a C# function into Power Fx. /// Dervied class should follow this convention: From 0959061e81d42048585861799f84cf790f5938d5 Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 16:44:14 +0000 Subject: [PATCH 6/8] Internals visible to PiFlow.Server --- src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs index 2f807e13e8..505025fcc2 100644 --- a/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Core/AssemblyProperties.cs @@ -44,3 +44,6 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + +// PiFlows Server +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file From a85bdad361d2e3efd0a6e18355982279fe999b5b Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Tue, 28 Feb 2023 16:50:43 +0000 Subject: [PATCH 7/8] Updated FunctionCategories with PiFlow support --- .../Microsoft.PowerFx.Core/Types/FunctionCategories.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index e3755ffd1e..ce822c7c7d 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -20,6 +20,7 @@ public enum FunctionCategories : uint Information = 0x40, Color = 0x80, REST = 0x100, - Component = 0x200 + Component = 0x200, + PiFlow = 0x400 } } From 4eadd9398c3a04c157aee877dc3b81d395ae5b6b Mon Sep 17 00:00:00 2001 From: Eswar Prakash Date: Sun, 5 Mar 2023 19:56:18 +0000 Subject: [PATCH 8/8] Before pull from main --- src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs | 6 +++++- .../Microsoft.PowerFx.Core/Types/FunctionCategories.cs | 2 ++ .../Microsoft.PowerFx.Interpreter/AssemblyProperties.cs | 2 +- .../Microsoft.PowerFx.Interpreter/ParsedExpression.cs | 5 +++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs b/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs index c0f66070ee..56d814a3ec 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Public/CheckResult.cs @@ -240,12 +240,14 @@ internal TexlBinding Binding } } +#pragma warning disable CS1574, CS1584, CS1581, CS1580 /// /// List of all errors and warnings. Check . /// This can include Parse, Bind, and per-engine custom errors (see , /// or any custom errors passes explicit to the ctor. /// Not null, but empty on success. /// +#pragma warning restore CS1574, CS1584, CS1581, CS1580 public IEnumerable Errors { get => GetErrorsInLocale(null); @@ -450,12 +452,14 @@ public void ApplyDependencyAnalysis() // Flag to ensure Post Checks are only invoked once. private bool _invokingPostCheck; - + +#pragma warning disable CS1574, CS1584, CS1581, CS1580 /// /// Calculate all errors. /// Invoke Binding and any engine-specific errors via . /// /// +#pragma warning restore CS1574, CS1584, CS1581, CS1580 public IEnumerable ApplyErrors() { if (!_invokingPostCheck) diff --git a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs index ce822c7c7d..ab82faddde 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Types/FunctionCategories.cs @@ -8,7 +8,9 @@ namespace Microsoft.PowerFx.Core.Types { [Flags] [TransportType(TransportKind.Enum)] +#pragma warning disable CA1028 public enum FunctionCategories : uint +#pragma warning restore CA1028 { None = 0x0, Text = 0x1, diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs index 212cbda780..22fa4aa6a6 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/AssemblyProperties.cs @@ -7,4 +7,4 @@ [assembly: InternalsVisibleTo("Microsoft.PowerFx.Connectors, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] // PiFlows Server -[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] \ No newline at end of file +[assembly: InternalsVisibleTo("Berry.PiFlow.Server, PublicKey=0024000004800000940000000602000000240000525341310004000001000100013b46091645a2e69cb6b4793aa9d1603c26d9a9723a68036913d487c51ce7bc1ad3ba01e42d2d88e57620515beb899b3aec91e0bc7ff97bf64b883917170c6b1360b51a2056a302db97fc425c5f26c1b7a875f3780e226b62bfc5599090e8d0eee028d40af84fc9049f8def05357ce0c38c807bd52b79d7d23d2ffb654cd6b7")] diff --git a/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs b/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs index fde3ff2084..616c02e7d0 100644 --- a/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs +++ b/src/libraries/Microsoft.PowerFx.Interpreter/ParsedExpression.cs @@ -19,6 +19,8 @@ namespace Microsoft.PowerFx /// public interface IExpressionEvaluator { + ReadOnlySymbolValues NewFromRecordValue(RecordValue recordValue = null); + public Task EvalAsync(CancellationToken cancellationToken, IRuntimeConfig runtimeConfig = null); } @@ -137,6 +139,9 @@ async Task IExpression.EvalAsync(RecordValue parameters, Cancellat } } + public ReadOnlySymbolValues NewFromRecordValue(RecordValue recordValue = null) => + ReadOnlySymbolValues.NewFromRecord(_parameterSymbolTable, recordValue); + public async Task EvalAsync(CancellationToken cancellationToken, IRuntimeConfig runtimeConfig = null) { ReadOnlySymbolValues symbolValues = ComposedReadOnlySymbolValues.New(