@@ -39,7 +39,7 @@ public interface IMachineRuntime : IDisposable
39
39
/// </summary>
40
40
/// <param name="type">Type of the machine.</param>
41
41
/// <param name="machineName">Optional machine name used for logging.</param>
42
- /// <returns>The result is the <see cref="MachineId"/> .</returns>
42
+ /// <returns>The result is the machine id .</returns>
43
43
MachineId CreateMachineId ( Type type , string machineName = null ) ;
44
44
45
45
/// <summary>
@@ -50,7 +50,7 @@ public interface IMachineRuntime : IDisposable
50
50
/// </summary>
51
51
/// <param name="type">Type of the machine.</param>
52
52
/// <param name="machineName">Unique name used to create or get the machine id.</param>
53
- /// <returns>The result is the <see cref="MachineId"/> .</returns>
53
+ /// <returns>The result is the machine id .</returns>
54
54
MachineId CreateMachineIdFromName ( Type type , string machineName ) ;
55
55
56
56
/// <summary>
@@ -61,8 +61,8 @@ public interface IMachineRuntime : IDisposable
61
61
/// <param name="type">Type of the machine.</param>
62
62
/// <param name="e">Optional event used during initialization.</param>
63
63
/// <param name="operationGroupId">Optional operation group id.</param>
64
- /// <returns>The result is the <see cref="MachineId"/> .</returns>
65
- MachineId CreateMachine ( Type type , Event e = null , Guid ? operationGroupId = null ) ;
64
+ /// <returns>The result is the machine id .</returns>
65
+ MachineId CreateMachine ( Type type , Event e = null , Guid operationGroupId = default ) ;
66
66
67
67
/// <summary>
68
68
/// Creates a new machine of the specified <see cref="Type"/> and name, and
@@ -73,8 +73,8 @@ public interface IMachineRuntime : IDisposable
73
73
/// <param name="machineName">Optional machine name used for logging.</param>
74
74
/// <param name="e">Optional event used during initialization.</param>
75
75
/// <param name="operationGroupId">Optional operation group id.</param>
76
- /// <returns>The result is the <see cref="MachineId"/> .</returns>
77
- MachineId CreateMachine ( Type type , string machineName , Event e = null , Guid ? operationGroupId = null ) ;
76
+ /// <returns>The result is the machine id .</returns>
77
+ MachineId CreateMachine ( Type type , string machineName , Event e = null , Guid operationGroupId = default ) ;
78
78
79
79
/// <summary>
80
80
/// Creates a new machine of the specified type, using the specified <see cref="MachineId"/>.
@@ -85,8 +85,8 @@ public interface IMachineRuntime : IDisposable
85
85
/// <param name="type">Type of the machine.</param>
86
86
/// <param name="e">Optional event used during initialization.</param>
87
87
/// <param name="operationGroupId">Optional operation group id.</param>
88
- /// <returns>The result is the <see cref="MachineId"/> .</returns>
89
- MachineId CreateMachine ( MachineId mid , Type type , Event e = null , Guid ? operationGroupId = null ) ;
88
+ /// <returns>The result is the machine id .</returns>
89
+ MachineId CreateMachine ( MachineId mid , Type type , Event e = null , Guid operationGroupId = default ) ;
90
90
91
91
/// <summary>
92
92
/// Creates a new machine of the specified <see cref="Type"/> and with the
@@ -97,8 +97,8 @@ public interface IMachineRuntime : IDisposable
97
97
/// <param name="type">Type of the machine.</param>
98
98
/// <param name="e">Optional event used during initialization.</param>
99
99
/// <param name="operationGroupId">Optional operation group id.</param>
100
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
101
- Task < MachineId > CreateMachineAndExecuteAsync ( Type type , Event e = null , Guid ? operationGroupId = null ) ;
100
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
101
+ Task < MachineId > CreateMachineAndExecuteAsync ( Type type , Event e = null , Guid operationGroupId = default ) ;
102
102
103
103
/// <summary>
104
104
/// Creates a new machine of the specified <see cref="Type"/> and name, and with
@@ -110,8 +110,8 @@ public interface IMachineRuntime : IDisposable
110
110
/// <param name="machineName">Optional machine name used for logging.</param>
111
111
/// <param name="e">Optional event used during initialization.</param>
112
112
/// <param name="operationGroupId">Optional operation group id.</param>
113
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
114
- Task < MachineId > CreateMachineAndExecuteAsync ( Type type , string machineName , Event e = null , Guid ? operationGroupId = null ) ;
113
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
114
+ Task < MachineId > CreateMachineAndExecuteAsync ( Type type , string machineName , Event e = null , Guid operationGroupId = default ) ;
115
115
116
116
/// <summary>
117
117
/// Creates a new machine of the specified <see cref="Type"/>, using the specified
@@ -124,8 +124,8 @@ public interface IMachineRuntime : IDisposable
124
124
/// <param name="type">Type of the machine.</param>
125
125
/// <param name="e">Optional event used during initialization.</param>
126
126
/// <param name="operationGroupId">Optional operation group id.</param>
127
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
128
- Task < MachineId > CreateMachineAndExecuteAsync ( MachineId mid , Type type , Event e = null , Guid ? operationGroupId = null ) ;
127
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
128
+ Task < MachineId > CreateMachineAndExecuteAsync ( MachineId mid , Type type , Event e = null , Guid operationGroupId = default ) ;
129
129
130
130
/// <summary>
131
131
/// Creates a new machine of the specified <see cref="Type"/> and with the
@@ -136,9 +136,9 @@ public interface IMachineRuntime : IDisposable
136
136
/// <param name="type">Type of the machine.</param>
137
137
/// <param name="e">Optional event used during initialization.</param>
138
138
/// <param name="operationGroupId">Optional operation group id.</param>
139
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
139
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
140
140
[ Obsolete ( "Please use IMachineRuntime.CreateMachineAndExecuteAsync(...) instead." ) ]
141
- Task < MachineId > CreateMachineAndExecute ( Type type , Event e = null , Guid ? operationGroupId = null ) ;
141
+ Task < MachineId > CreateMachineAndExecute ( Type type , Event e = null , Guid operationGroupId = default ) ;
142
142
143
143
/// <summary>
144
144
/// Creates a new machine of the specified <see cref="Type"/> and name, and with
@@ -150,9 +150,9 @@ public interface IMachineRuntime : IDisposable
150
150
/// <param name="machineName">Optional machine name used for logging.</param>
151
151
/// <param name="e">Optional event used during initialization.</param>
152
152
/// <param name="operationGroupId">Optional operation group id.</param>
153
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
153
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
154
154
[ Obsolete ( "Please use IMachineRuntime.CreateMachineAndExecuteAsync(...) instead." ) ]
155
- Task < MachineId > CreateMachineAndExecute ( Type type , string machineName , Event e = null , Guid ? operationGroupId = null ) ;
155
+ Task < MachineId > CreateMachineAndExecute ( Type type , string machineName , Event e = null , Guid operationGroupId = default ) ;
156
156
157
157
/// <summary>
158
158
/// Creates a new machine of the specified <see cref="Type"/>, using the specified
@@ -165,40 +165,43 @@ public interface IMachineRuntime : IDisposable
165
165
/// <param name="type">Type of the machine.</param>
166
166
/// <param name="e">Optional event used during initialization.</param>
167
167
/// <param name="operationGroupId">Optional operation group id.</param>
168
- /// <returns>Task that represents the asynchronous operation. The task result is the <see cref="MachineId"/> .</returns>
168
+ /// <returns>Task that represents the asynchronous operation. The task result is the machine id .</returns>
169
169
[ Obsolete ( "Please use IMachineRuntime.CreateMachineAndExecuteAsync(...) instead." ) ]
170
- Task < MachineId > CreateMachineAndExecute ( MachineId mid , Type type , Event e = null , Guid ? operationGroupId = null ) ;
170
+ Task < MachineId > CreateMachineAndExecute ( MachineId mid , Type type , Event e = null , Guid operationGroupId = default ) ;
171
171
172
172
/// <summary>
173
173
/// Sends an asynchronous <see cref="Event"/> to a machine.
174
174
/// </summary>
175
175
/// <param name="target">The id of the target machine.</param>
176
176
/// <param name="e">The event to send.</param>
177
- /// <param name="options">Optional parameters of a send operation.</param>
178
- void SendEvent ( MachineId target , Event e , SendOptions options = null ) ;
177
+ /// <param name="operationGroupId">Optional operation group id.</param>
178
+ /// <param name="options">Optional configuration of a send operation.</param>
179
+ void SendEvent ( MachineId target , Event e , Guid operationGroupId = default , SendOptions options = null ) ;
179
180
180
181
/// <summary>
181
182
/// Sends an <see cref="Event"/> to a machine. Returns immediately if the target machine was already
182
- /// running. Otherwise blocks until the machine handles the event and reaches quiescense again .
183
+ /// running. Otherwise blocks until the machine handles the event and reaches quiescense.
183
184
/// </summary>
184
185
/// <param name="target">The id of the target machine.</param>
185
186
/// <param name="e">The event to send.</param>
186
- /// <param name="options">Optional parameters of a send operation.</param>
187
+ /// <param name="operationGroupId">Optional operation group id.</param>
188
+ /// <param name="options">Optional configuration of a send operation.</param>
187
189
/// <returns>Task that represents the asynchronous operation. The task result is true if
188
190
/// the event was handled, false if the event was only enqueued.</returns>
189
- Task < bool > SendEventAndExecuteAsync ( MachineId target , Event e , SendOptions options = null ) ;
191
+ Task < bool > SendEventAndExecuteAsync ( MachineId target , Event e , Guid operationGroupId = default , SendOptions options = null ) ;
190
192
191
193
/// <summary>
192
194
/// Sends an <see cref="Event"/> to a machine. Returns immediately if the target machine was already
193
- /// running. Otherwise blocks until the machine handles the event and reaches quiescense again .
195
+ /// running. Otherwise blocks until the machine handles the event and reaches quiescense.
194
196
/// </summary>
195
197
/// <param name="target">The id of the target machine.</param>
196
198
/// <param name="e">The event to send.</param>
197
- /// <param name="options">Optional parameters of a send operation.</param>
199
+ /// <param name="operationGroupId">Optional operation group id.</param>
200
+ /// <param name="options">Optional configuration of a send operation.</param>
198
201
/// <returns>Task that represents the asynchronous operation. The task result is true if
199
202
/// the event was handled, false if the event was only enqueued.</returns>
200
203
[ Obsolete ( "Please use IMachineRuntime.SendEventAndExecuteAsync(...) instead." ) ]
201
- Task < bool > SendEventAndExecute ( MachineId target , Event e , SendOptions options = null ) ;
204
+ Task < bool > SendEventAndExecute ( MachineId target , Event e , Guid operationGroupId = default , SendOptions options = null ) ;
202
205
203
206
/// <summary>
204
207
/// Registers a new specification monitor of the specified <see cref="Type"/>.
@@ -313,5 +316,10 @@ bool FairRandom(
313
316
/// </summary>
314
317
/// <param name="logger">The logger to install.</param>
315
318
void SetLogger ( ILogger logger ) ;
319
+
320
+ /// <summary>
321
+ /// Terminates the runtime and notifies each active machine to halt execution.
322
+ /// </summary>
323
+ void Stop ( ) ;
316
324
}
317
325
}
0 commit comments