Skip to content

Commit f447c7d

Browse files
authored
Merge pull request #92 from SuessLabs/feature/89-RegisterState-EvtAggrSubscriptions
#89 - RegisterState Subscriptions to Event Aggregator
2 parents d8d030c + 979ca73 commit f447c7d

11 files changed

Lines changed: 102 additions & 68 deletions

File tree

source/Lite.StateMachine.Tests/StateTests/CommandStateTests.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public async Task BasicState_Override_Executes_SuccessAsync()
4747

4848
machine
4949
.AddContext(ctxProperties)
50-
.RegisterState<State1>(StateId.State1, StateId.State2)
50+
.RegisterState<State1>(StateId.State1, StateId.State2, subscriptionTypes: [typeof(UnlockResponse)])
5151
.RegisterComposite<State2>(StateId.State2, initialChildStateId: StateId.State2_Sub1, onSuccess: StateId.State3)
5252
.RegisterSubState<State2_Sub1>(StateId.State2_Sub1, parentStateId: StateId.State2, onSuccess: StateId.State2_Sub2)
5353
.RegisterSubComposite<State2_Sub2>(StateId.State2_Sub2, parentStateId: StateId.State2, initialChildStateId: StateId.State2_Sub2_Sub1, onSuccess: StateId.State2_Sub3)
54-
.RegisterSubState<State2_Sub2_Sub1>(StateId.State2_Sub2_Sub1, parentStateId: StateId.State2_Sub2, onSuccess: StateId.State2_Sub2_Sub2)
54+
.RegisterSubState<State2_Sub2_Sub1>(StateId.State2_Sub2_Sub1, parentStateId: StateId.State2_Sub2, onSuccess: StateId.State2_Sub2_Sub2, subscriptionTypes: [typeof(UnlockResponse), typeof(CloseResponse)])
5555
.RegisterSubState<State2_Sub2_Sub2>(StateId.State2_Sub2_Sub2, parentStateId: StateId.State2_Sub2, onSuccess: StateId.State2_Sub2_Sub3)
5656
.RegisterSubState<State2_Sub2_Sub3>(StateId.State2_Sub2_Sub3, parentStateId: StateId.State2_Sub2, onSuccess: null)
5757
.RegisterSubState<State2_Sub3>(StateId.State2_Sub3, parentStateId: StateId.State2, onSuccess: null)
@@ -140,7 +140,11 @@ public async Task CancelsInfiniteStateMachineTestAsync()
140140
Assert.AreEqual(100, counter);
141141
}
142142

143+
#pragma warning disable SA1124 // Do not use regions
144+
#region Infinite Loop Test State Classes
145+
143146
private class InfState1 : IState<StateId>
147+
#pragma warning restore SA1124 // Do not use regions
144148
{
145149
public Task OnEnter(Context<StateId> context)
146150
{
@@ -178,4 +182,6 @@ public Task OnMessage(Context<StateId> context, object message)
178182

179183
public Task OnTimeout(Context<StateId> context) => Task.CompletedTask;
180184
}
185+
186+
#endregion Infinite Loop Test State Classes
181187
}

source/Lite.StateMachine.Tests/TestData/Services/MessageService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface IMessageService
1111
{
1212
/// <summary
1313
/// Gets or sets a counter.
14-
/// <see cref="DiStateBase{TStateClass, TStateId}"/> uses it as an automatic state transition counter.
14+
/// <see cref="StateDiBase{TStateClass, TStateId}"/> uses it as an automatic state transition counter.
1515
/// </summary>
1616
int Counter1 { get; set; }
1717

source/Lite.StateMachine.Tests/TestData/States/BasicDiStates.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ namespace Lite.StateMachine.Tests.TestData.States;
1010
#pragma warning disable SA1402 // File may only contain a single type
1111

1212
public class BasicDiState1(IMessageService msg, ILogger<BasicDiState1> log)
13-
: DiStateBase<BasicDiState1, BasicStateId>(msg, log);
13+
: StateDiBase<BasicDiState1, BasicStateId>(msg, log);
1414

1515
public class BasicDiState2(IMessageService msg, ILogger<BasicDiState2> log)
16-
: DiStateBase<BasicDiState2, BasicStateId>(msg, log);
16+
: StateDiBase<BasicDiState2, BasicStateId>(msg, log);
1717

1818
public class BasicDiState3(IMessageService msg, ILogger<BasicDiState3> log)
19-
: DiStateBase<BasicDiState3, BasicStateId>(msg, log);
19+
: StateDiBase<BasicDiState3, BasicStateId>(msg, log);
2020

2121
#pragma warning restore SA1649 // File name should match first type name
2222
#pragma warning restore SA1402 // File may only contain a single type

source/Lite.StateMachine.Tests/TestData/States/CommandL3States.cs

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,14 @@ public enum StateId
3131
Error,
3232
}
3333

34-
public class CommonDiStateBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger)
35-
: DiStateBase<TStateClass, TStateId>(msg, logger)
36-
where TStateId : struct, Enum
37-
{
38-
// Helper so we don't have to keep rewriting the same "override Task OnEnter(...)"
39-
// 8 lines * 9 states.. useless
40-
public override Task OnEnter(Context<TStateId> context)
41-
{
42-
context.Parameters.Add(context.CurrentStateId.ToString(), Guid.NewGuid());
43-
MessageService.AddMessage($"[Keys-{context.CurrentStateId}]: {string.Join(",", context.Parameters.Keys)}");
44-
return base.OnEnter(context);
45-
}
46-
}
47-
4834
public class State1(IMessageService msg, ILogger<State1> log)
4935
: CommandStateBase<State1, StateId>(msg, log)
5036
{
5137
/// <summary>Gets message types for command state to subscribe to.</summary>
38+
/// <remarks>
39+
/// Already subscribed to in StateMachine builder. Defining twice to test that we don't
40+
/// get duplicate messages.
41+
/// </remarks>
5242
public override IReadOnlyCollection<Type> SubscribedMessageTypes => new[]
5343
{
5444
//// typeof(OpenCommand), // <---- NOTE: Not needed
@@ -96,7 +86,7 @@ public override Task OnTimeout(Context<StateId> context)
9686

9787
/// <summary>Level-1: Composite.</summary>
9888
public class State2(IMessageService msg, ILogger<State2> log)
99-
: CommonDiStateBase<State2, StateId>(msg, log)
89+
: StateDiMessageBase<State2, StateId>(msg, log)
10090
{
10191
#region CodeMaid - Suppress method sorting
10292

@@ -127,14 +117,14 @@ public override Task OnExit(Context<StateId> context)
127117

128118
/// <summary>Sublevel-2: State.<summary>
129119
public class State2_Sub1(IMessageService msg, ILogger<State2_Sub1> log)
130-
: CommonDiStateBase<State2_Sub1, StateId>(msg, log)
120+
: StateDiMessageBase<State2_Sub1, StateId>(msg, log)
131121
{
132122
public override Task OnEnter(Context<StateId> context) => base.OnEnter(context);
133123
}
134124

135125
/// <summary>Sublevel-2: Composite.</summary>
136126
public class State2_Sub2(IMessageService msg, ILogger<State2_Sub2> log)
137-
: CommonDiStateBase<State2_Sub2, StateId>(msg, log)
127+
: StateDiMessageBase<State2_Sub2, StateId>(msg, log)
138128
{
139129
#region CodeMaid - DoNotReorder
140130

@@ -173,7 +163,7 @@ public override Task OnExit(Context<StateId> context)
173163

174164
/// <summary>Sublevel-3: State.</summary>
175165
public class State2_Sub2_Sub1(IMessageService msg, ILogger<State2_Sub2_Sub1> log)
176-
: CommonDiStateBase<State2_Sub2_Sub1, StateId>(msg, log)
166+
: StateDiMessageBase<State2_Sub2_Sub1, StateId>(msg, log)
177167
{
178168
public override Task OnEnter(Context<StateId> context) => base.OnEnter(context);
179169
}
@@ -182,12 +172,13 @@ public class State2_Sub2_Sub1(IMessageService msg, ILogger<State2_Sub2_Sub1> log
182172
public class State2_Sub2_Sub2(IMessageService msg, ILogger<State2_Sub2_Sub2> log)
183173
: CommandStateBase<State2_Sub2_Sub2, StateId>(msg, log)
184174
{
185-
/// <summary>Gets message types for command state to subscribe to.</summary>
186-
public override IReadOnlyCollection<Type> SubscribedMessageTypes =>
187-
[
188-
typeof(UnlockResponse),
189-
typeof(CloseResponse),
190-
];
175+
// Already subscribed to in StateMachine builder
176+
/////// <summary>Gets message types for command state to subscribe to.</summary>
177+
////public override IReadOnlyCollection<Type> SubscribedMessageTypes =>
178+
////[
179+
//// typeof(UnlockResponse),
180+
//// typeof(CloseResponse),
181+
////];
191182

192183
public override Task OnEnter(Context<StateId> context)
193184
{
@@ -224,14 +215,14 @@ public override Task OnTimeout(Context<StateId> context)
224215

225216
/// <summary>Sublevel-3: Last State.</summary>
226217
public class State2_Sub2_Sub3(IMessageService msg, ILogger<State2_Sub2_Sub3> log)
227-
: CommonDiStateBase<State2_Sub2_Sub3, StateId>(msg, log)
218+
: StateDiMessageBase<State2_Sub2_Sub3, StateId>(msg, log)
228219
{
229220
public override Task OnEnter(Context<StateId> context) => base.OnEnter(context);
230221
}
231222

232223
/// <summary>Sublevel-2: Last State.</summary>
233224
public class State2_Sub3(IMessageService msg, ILogger<State2_Sub3> log)
234-
: DiStateBase<State2_Sub3, StateId>(msg, log)
225+
: StateDiBase<State2_Sub3, StateId>(msg, log)
235226
{
236227
public override Task OnEnter(Context<StateId> context)
237228
{
@@ -250,7 +241,7 @@ public override Task OnEnter(Context<StateId> context)
250241

251242
/// <summary>Make sure not child-created context is there.</summary>
252243
public class State3(IMessageService msg, ILogger<State3> log)
253-
: DiStateBase<State3, StateId>(msg, log)
244+
: StateDiBase<State3, StateId>(msg, log)
254245
{
255246
public override Task OnEnter(Context<StateId> context)
256247
{
@@ -263,6 +254,20 @@ public override Task OnEnter(Context<StateId> context)
263254
}
264255
}
265256

257+
public class StateDiMessageBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger)
258+
: StateDiBase<TStateClass, TStateId>(msg, logger)
259+
where TStateId : struct, Enum
260+
{
261+
// Helper so we don't have to keep rewriting the same "override Task OnEnter(...)"
262+
// 8 lines * 9 states.. useless
263+
public override Task OnEnter(Context<TStateId> context)
264+
{
265+
context.Parameters.Add(context.CurrentStateId.ToString(), Guid.NewGuid());
266+
MessageService.AddMessage($"[Keys-{context.CurrentStateId}]: {string.Join(",", context.Parameters.Keys)}");
267+
return base.OnEnter(context);
268+
}
269+
}
270+
266271
#pragma warning restore IDE0130 // Namespace does not match folder structure
267272
#pragma warning restore SA1649 // File name should match first type name
268273
#pragma warning restore SA1402 // File may only contain a single type

source/Lite.StateMachine.Tests/TestData/States/CommandStateBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace Lite.StateMachine.Tests.TestData.States;
1414
/// <typeparam name="TStateClass">State class object.</typeparam>
1515
/// <typeparam name="TStateId">State Id.</typeparam>
1616
public class CommandStateBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger)
17-
: DiStateBase<TStateClass, TStateId>(msg, logger), ICommandState<TStateId>
17+
: StateDiBase<TStateClass, TStateId>(msg, logger), ICommandState<TStateId>
1818
where TStateId : struct, Enum
1919
{
2020
//// NEEDS TESTED: public virtual IReadOnlyCollection<ICustomCommand> SubscribedMessageTypes => [];

source/Lite.StateMachine.Tests/TestData/States/CompositeL1DiStates.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ namespace Lite.StateMachine.Tests.TestData.States;
1212
#pragma warning disable SA1402 // File may only contain a single type
1313

1414
public class EntryState(IMessageService msg, ILogger<EntryState> log)
15-
: DiStateBase<EntryState, CompositeMsgStateId>(msg, log)
15+
: StateDiBase<EntryState, CompositeMsgStateId>(msg, log)
1616
{
1717
}
1818

1919
public class ParentState(IMessageService msg, ILogger<ParentState> log)
20-
: DiStateBase<ParentState, CompositeMsgStateId>(msg, log)
20+
: StateDiBase<ParentState, CompositeMsgStateId>(msg, log)
2121
{
2222
/// <summary>Handle the result from our last child state.</summary>
2323
/// <param name="context">Context data.</param>
@@ -40,12 +40,12 @@ public override Task OnExit(Context<CompositeMsgStateId> context)
4040
}
4141

4242
public class ParentSub_FetchState(IMessageService msg, ILogger<ParentSub_FetchState> log)
43-
: DiStateBase<ParentSub_FetchState, CompositeMsgStateId>(msg, log)
43+
: StateDiBase<ParentSub_FetchState, CompositeMsgStateId>(msg, log)
4444
{
4545
}
4646

4747
public class ParentSub_WaitMessageState(IMessageService msg, ILogger<ParentSub_WaitMessageState> log)
48-
: DiStateBase<ParentSub_WaitMessageState, CompositeMsgStateId>(msg, log),
48+
: StateDiBase<ParentSub_WaitMessageState, CompositeMsgStateId>(msg, log),
4949
ICommandState<CompositeMsgStateId>
5050
{
5151
public override Task OnEnter(Context<CompositeMsgStateId> context)
@@ -134,12 +134,12 @@ public Task OnTimeout(Context<CompositeMsgStateId> context)
134134
}
135135

136136
public class Workflow_DoneState(IMessageService msg, ILogger<Workflow_DoneState> log)
137-
: DiStateBase<Workflow_DoneState, CompositeMsgStateId>(msg, log)
137+
: StateDiBase<Workflow_DoneState, CompositeMsgStateId>(msg, log)
138138
{
139139
}
140140

141141
public class Workflow_ErrorState(IMessageService msg, ILogger<Workflow_ErrorState> log)
142-
: DiStateBase<Workflow_ErrorState, CompositeMsgStateId>(msg, log)
142+
: StateDiBase<Workflow_ErrorState, CompositeMsgStateId>(msg, log)
143143
{
144144
public override Task OnEnter(Context<CompositeMsgStateId> context)
145145
{
@@ -158,7 +158,7 @@ public override Task OnEnter(Context<CompositeMsgStateId> context)
158158
}
159159

160160
public class Workflow_FailureState(IMessageService msg, ILogger<Workflow_FailureState> log)
161-
: DiStateBase<Workflow_FailureState, CompositeMsgStateId>(msg, log)
161+
: StateDiBase<Workflow_FailureState, CompositeMsgStateId>(msg, log)
162162
{
163163
public override Task OnEnter(Context<CompositeMsgStateId> context)
164164
{

source/Lite.StateMachine.Tests/TestData/States/CompositeL3DiStates.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
namespace Lite.StateMachine.Tests.TestData.States.CompositeL3DiStates;
1616

1717
public class CommonDiStateBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger)
18-
: DiStateBase<TStateClass, TStateId>(msg, logger)
18+
: StateDiBase<TStateClass, TStateId>(msg, logger)
1919
where TStateId : struct, Enum
2020
{
2121
// Helper so we don't have to keep rewriting the same "override Task OnEnter(...)"
@@ -29,7 +29,7 @@ public override Task OnEnter(Context<TStateId> context)
2929
}
3030

3131
public class State1(IMessageService msg, ILogger<State1> log)
32-
: DiStateBase<State1, CompositeL3>(msg, log)
32+
: StateDiBase<State1, CompositeL3>(msg, log)
3333
{
3434
public override Task OnEnter(Context<CompositeL3> context)
3535
{
@@ -154,7 +154,7 @@ public override Task OnEnter(Context<CompositeL3> context)
154154

155155
/// <summary>Sublevel-2: Last State.</summary>
156156
public class State2_Sub3(IMessageService msg, ILogger<State2_Sub3> log)
157-
: DiStateBase<State2_Sub3, CompositeL3>(msg, log)
157+
: StateDiBase<State2_Sub3, CompositeL3>(msg, log)
158158
{
159159
public override Task OnEnter(Context<CompositeL3> context)
160160
{
@@ -169,7 +169,7 @@ public override Task OnEnter(Context<CompositeL3> context)
169169

170170
/// <summary>Make sure not child-created context is there.</summary>
171171
public class State3(IMessageService msg, ILogger<State3> log)
172-
: DiStateBase<State3, CompositeL3>(msg, log)
172+
: StateDiBase<State3, CompositeL3>(msg, log)
173173
{
174174
public override Task OnEnter(Context<CompositeL3> context)
175175
{

source/Lite.StateMachine.Tests/TestData/States/DiStateBase.cs renamed to source/Lite.StateMachine.Tests/TestData/States/StateDiBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Lite.StateMachine.Tests.TestData.States;
1111

1212
#pragma warning disable SA1124 // Do not use regions
1313

14-
public class DiStateBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger) : IState<TStateId>
14+
public class StateDiBase<TStateClass, TStateId>(IMessageService msg, ILogger<TStateClass> logger) : IState<TStateId>
1515
where TStateId : struct, Enum
1616
{
1717
private readonly ILogger<TStateClass> _logger = logger;

source/Lite.StateMachine/IStateMachine.cs

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,22 @@ public interface IStateMachine<TStateId>
2424
/// <summary>Gets or sets the default <see cref="IState{TState}"/> timeout in milliseconds (<see cref="Timeout.Infinite"/>ms default). Set timeout to ensure no stuck states (i.e., robotics).</summary>
2525
int DefaultStateTimeoutMs { get; set; }
2626

27+
/// <summary>Gets or sets a value indicating whether substate-added context persists when returning to the parent (default: true).</summary>
28+
bool IsContextPersistent { get; set; }
29+
2730
/// <summary>Gets the collection of all registered states.</summary>
2831
/// <remarks>
2932
/// Exposed for validations, debugging, etc.
3033
/// Previously: <![CDATA[Dictionary<TStateId, IState<TStateId>>]]>.
3134
/// </remarks>
3235
List<TStateId> States { get; }
3336

37+
/// <summary>Preload properties and errors to the context.</summary>
38+
/// <param name="parameters">Parameter properties to safely add/update.</param>
39+
/// <param name="errors">Error properties to safely add/update.</param>
40+
/// <returns>Instance of this class.</returns>
41+
StateMachine<TStateId> AddContext(PropertyBag? parameters = null, PropertyBag? errors = null);
42+
3443
/// <summary>
3544
/// Registers a top-level composite parent state (has no parent state) and explicitly sets:
3645
/// - the initial child (initialChildStateId).
@@ -63,10 +72,11 @@ StateMachine<TStateId> RegisterSubComposite<TCompositeParent>(TStateId stateId,
6372
/// <param name="onSuccess">State Id to transition to on success, or null to denote last state and exit <see cref="StateMachine{TStateId}"/>.</param>
6473
/// <param name="onError">State Id to transition to on error, or null to denote last state and exit <see cref="StateMachine{TStateId}"/>.</param>
6574
/// <param name="onFailure">State Id to transition to on failure, or null to denote last state and exit <see cref="StateMachine{TStateId}"/>.</param>
75+
/// <param name="commandSubscriptionTypes">Optional <see cref="ICommandState{TStateId}"/> subscription message types.</param>
6676
/// <returns>Instance of this class.</returns>
6777
/// <typeparam name="TState">State class.</typeparam>
6878
/// <remarks>Example: <![CDATA[RegisterState<T>(StateId.State1, StateId.State2);]]>.</remarks>
69-
StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSuccess, TStateId? onError, TStateId? onFailure)
79+
StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSuccess, TStateId? onError, TStateId? onFailure, IReadOnlyCollection<Type>? commandSubscriptionTypes = null)
7080
where TState : class, IState<TStateId>;
7181

7282
/// <summary>
@@ -79,14 +89,15 @@ StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSucce
7989
/// <param name="parentStateId">The identifier of the parent state if the registered state is part of a composite state; otherwise, null.</param>
8090
/// <param name="isCompositeParent">true if the registered state is a composite parent state; otherwise, false.</param>
8191
/// <param name="initialChildStateId">The identifier of the initial child state to activate when entering a composite parent state; otherwise, null.</param>
92+
/// <param name="commandSubscriptionTypes">Optional <see cref="ICommandState{TStateId}"/> subscription message types.</param>
8293
/// <returns>The current <see cref="StateMachine{TStateId}"/> instance, enabling method chaining.</returns>
8394
/// <typeparam name="TState">The type of the state to register. Must implement <see cref="IState{TStateId}"/>.</typeparam>
8495
/// <exception cref="InvalidOperationException">Thrown if a state with the specified stateId is already registered or if the state factory returns null.</exception>
8596
/// <remarks>
8697
/// Use this method to add states and define their transitions and hierarchy before starting the
8798
/// state machine. Registering duplicate state identifiers is not allowed.
8899
/// </remarks>
89-
StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSuccess, TStateId? onError, TStateId? onFailure, TStateId? parentStateId = null, bool isCompositeParent = false, TStateId? initialChildStateId = null)
100+
StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSuccess, TStateId? onError, TStateId? onFailure, TStateId? parentStateId = null, bool isCompositeParent = false, TStateId? initialChildStateId = null, IReadOnlyCollection<Type>? commandSubscriptionTypes = null)
90101
where TState : class, IState<TStateId>;
91102

92103
/// <summary>
@@ -99,8 +110,9 @@ StateMachine<TStateId> RegisterState<TState>(TStateId stateId, TStateId? onSucce
99110
/// <param name="onSuccess">The identifier of the state to transition to when the state completes successfully, or null to return to the parent composite state.</param>
100111
/// <param name="onError">The identifier of the state to transition to when the registered state encounters an error, or null if no transition is defined.</param>
101112
/// <param name="onFailure">The identifier of the state to transition to when the registered state fails, or null if no transition is defined.</param>
113+
/// <param name="commandSubscriptionTypes">Optional <see cref="ICommandState{TStateId}"/> subscription message types.</param>
102114
/// <returns>The current <see cref="StateMachine{TStateId}"/> instance, enabling method chaining.</returns>
103-
StateMachine<TStateId> RegisterSubState<TChildClass>(TStateId stateId, TStateId parentStateId, TStateId? onSuccess = null, TStateId? onError = null, TStateId? onFailure = null)
115+
StateMachine<TStateId> RegisterSubState<TChildClass>(TStateId stateId, TStateId parentStateId, TStateId? onSuccess = null, TStateId? onError = null, TStateId? onFailure = null, IReadOnlyCollection<Type>? commandSubscriptionTypes = null)
104116
where TChildClass : class, IState<TStateId>;
105117

106118
/// <summary>Starts the machine at the initial state.</summary>
@@ -109,7 +121,4 @@ StateMachine<TStateId> RegisterSubState<TChildClass>(TStateId stateId, TStateId
109121
/// <returns>Async task of The current <see cref="StateMachine{TStateId}"/> instance, enabling method chaining.</returns>
110122
/// <exception cref="InvalidOperationException">Thrown if the specified state identifier has not been registered.</exception>
111123
Task<StateMachine<TStateId>> RunAsync(TStateId initialState, CancellationToken cancellationToken = default);
112-
/////// <param name="parameterStack">Parameter stack <see cref="PropertyBag"/>.</param>
113-
/////// <param name="errors">Error stack <see cref="PropertyBag"/>.</param>
114-
////Task<StateMachine<TStateId>> RunAsync(TStateId initialState, PropertyBag? parameterStack = null, PropertyBag? errors = null, CancellationToken cancellationToken = default);
115124
}

0 commit comments

Comments
 (0)