-
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
147453a
commit 12fbdf3
Showing
185 changed files
with
1,421 additions
and
744 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
23 changes: 19 additions & 4 deletions
23
Core/Stateflows.Common/Activities/Events/ExecutionRequest.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 |
---|---|---|
@@ -1,14 +1,29 @@ | ||
using Newtonsoft.Json; | ||
using Stateflows.Common; | ||
using System.Linq; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
using Stateflows.Common; | ||
using Stateflows.Common.Utilities; | ||
|
||
namespace Stateflows.Activities.Events | ||
{ | ||
public sealed class ExecutionRequest : Request<ExecutionResponse> | ||
public interface IInputContainer | ||
{ | ||
void AddInputToken<TToken>(TToken token); | ||
|
||
void AddInputTokens<TToken>(IEnumerable<TToken> tokens); | ||
} | ||
|
||
public sealed class ExecutionRequest : Request<ExecutionResponse>, IInputContainer | ||
{ | ||
public Event InitializationEvent { get; set; } = new Initialize(); | ||
|
||
[JsonProperty(TypeNameHandling = TypeNameHandling.None)] | ||
public IEnumerable<object> InputTokens { get; set; } | ||
public List<TokenHolder> InputTokens { get; set; } = new List<TokenHolder>(); | ||
|
||
public void AddInputToken<TToken>(TToken token) | ||
=> InputTokens.Add(new TokenHolder<TToken>() { Payload = token }); | ||
|
||
public void AddInputTokens<TToken>(IEnumerable<TToken> tokens) | ||
=> InputTokens.AddRange(tokens.Select(token => new TokenHolder<TToken>() { Payload = token })); | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
Core/Stateflows.Common/Activities/Interfaces/IActivityBehavior.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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
using System.Threading.Tasks; | ||
using System.Collections.Generic; | ||
using System; | ||
using System.Threading.Tasks; | ||
using Stateflows.Common; | ||
using Stateflows.Activities.Events; | ||
|
||
namespace Stateflows.Activities | ||
{ | ||
public interface IActivityBehavior : IBehavior | ||
{ | ||
Task<RequestResult<ExecutionResponse>> ExecuteAsync(Event initializationEvent, IEnumerable<object> inputTokens = null); | ||
Task<RequestResult<ExecutionResponse>> ExecuteAsync(IEnumerable<object> inputTokens = null); | ||
Task<RequestResult<ExecutionResponse>> ExecuteAsync(Event initializationEvent, Action<IInputContainer> inputBuilder = null); | ||
Task<RequestResult<ExecutionResponse>> ExecuteAsync(Action<IInputContainer> inputBuilder = null); | ||
} | ||
} |
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
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
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
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
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
15 changes: 1 addition & 14 deletions
15
Core/Stateflows/Activities/Context/Interfaces/IActivityFlowContext.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
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
Oops, something went wrong.