Skip to content

Commit 2cb61ae

Browse files
committed
exposing EvalProcessor as public to provide for EvalProcessor.InvokeFunction
1 parent d8c39df commit 2cb61ae

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Jsonata.Net.Native/Eval/EvalProcessor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
namespace Jsonata.Net.Native.Eval
1212
{
13-
internal static class EvalProcessor
13+
//made public to allow calling EvalProcessor.InvokeFunction from custom function implementations
14+
public static class EvalProcessor
1415
{
1516
internal static readonly JValue UNDEFINED = JValue.CreateUndefined();
1617

@@ -470,7 +471,7 @@ private static JToken evalFunctionCall(FunctionCallNode functionCallNode, JToken
470471
return InvokeFunction(function, args, context, env);
471472
}
472473

473-
internal static JToken InvokeFunction(FunctionToken function, List<JToken> args, JToken? context, EvaluationEnvironment env)
474+
public static JToken InvokeFunction(FunctionToken function, List<JToken> args, JToken? context, EvaluationEnvironment env)
474475
{
475476
return function.Invoke(args, context, env);
476477
}

src/Jsonata.Net.Native/Eval/FunctionToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ internal override void ToStringFlatImpl(StringBuilder builder, SerializationSett
7373

7474
public override bool DeepEquals(JToken other)
7575
{
76-
throw new NotImplementedException("Not supported for functions");
76+
throw new NotSupportedException("Not supported for functions");
7777
}
7878
}
7979
}

0 commit comments

Comments
 (0)