-
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.
- Loading branch information
1 parent
589ce2a
commit b9a269f
Showing
3 changed files
with
24 additions
and
1 deletion.
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
22 changes: 22 additions & 0 deletions
22
src/WorkflowEngine.Core/Expressions/OutputsBodyFunction.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,22 @@ | ||
using ExpressionEngine; | ||
using ExpressionEngine.Functions.Base; | ||
using System.Threading.Tasks; | ||
|
||
namespace WorkflowEngine.Core.Expressions | ||
{ | ||
public class OutputsBodyFunction : IFunction | ||
{ | ||
private readonly OutputsFunction _outputsFunction; | ||
|
||
public OutputsBodyFunction(OutputsFunction outputsFunction) | ||
{ | ||
_outputsFunction = outputsFunction; | ||
} | ||
public async ValueTask<ValueContainer> ExecuteFunction(params ValueContainer[] parameters) | ||
{ | ||
var output = await _outputsFunction.ExecuteFunction(parameters); | ||
|
||
return output?["body"]; | ||
} | ||
} | ||
} |
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