-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Base should not parse values, I have instead introduced a new base class to handle parsing of inputs.
- Loading branch information
1 parent
d505842
commit bfe0141
Showing
6 changed files
with
60 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
PowerAutomateMockUp/FlowParser/ActionExecutors/InputsBaseActionExecutor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System; | ||
using Parser.ExpressionParser; | ||
|
||
namespace Parser.FlowParser.ActionExecutors | ||
{ | ||
public abstract class InputsBaseActionExecutor : ActionExecutorBase | ||
{ | ||
private readonly IExpressionEngine _expressionEngine; | ||
|
||
protected InputsBaseActionExecutor(IExpressionEngine expressionEngine) | ||
{ | ||
_expressionEngine = expressionEngine ?? throw new ArgumentNullException(nameof(expressionEngine)); | ||
} | ||
|
||
protected override void ProcessJson() | ||
{ | ||
var inputs = Json.SelectToken("$.inputs"); | ||
if (inputs != null) | ||
{ | ||
Inputs = new ValueContainer(inputs, _expressionEngine); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters