@@ -39,7 +39,7 @@ public interface IMachineRuntime : IDisposable
3939 /// </summary>
4040 /// <param name="type">Type of the machine.</param>
4141 /// <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>
4343 MachineId CreateMachineId ( Type type , string machineName = null ) ;
4444
4545 /// <summary>
@@ -50,7 +50,7 @@ public interface IMachineRuntime : IDisposable
5050 /// </summary>
5151 /// <param name="type">Type of the machine.</param>
5252 /// <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>
5454 MachineId CreateMachineIdFromName ( Type type , string machineName ) ;
5555
5656 /// <summary>
@@ -61,8 +61,8 @@ public interface IMachineRuntime : IDisposable
6161 /// <param name="type">Type of the machine.</param>
6262 /// <param name="e">Optional event used during initialization.</param>
6363 /// <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 ) ;
6666
6767 /// <summary>
6868 /// Creates a new machine of the specified <see cref="Type"/> and name, and
@@ -73,8 +73,8 @@ public interface IMachineRuntime : IDisposable
7373 /// <param name="machineName">Optional machine name used for logging.</param>
7474 /// <param name="e">Optional event used during initialization.</param>
7575 /// <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 ) ;
7878
7979 /// <summary>
8080 /// Creates a new machine of the specified type, using the specified <see cref="MachineId"/>.
@@ -85,8 +85,8 @@ public interface IMachineRuntime : IDisposable
8585 /// <param name="type">Type of the machine.</param>
8686 /// <param name="e">Optional event used during initialization.</param>
8787 /// <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 ) ;
9090
9191 /// <summary>
9292 /// Creates a new machine of the specified <see cref="Type"/> and with the
@@ -97,8 +97,8 @@ public interface IMachineRuntime : IDisposable
9797 /// <param name="type">Type of the machine.</param>
9898 /// <param name="e">Optional event used during initialization.</param>
9999 /// <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 ) ;
102102
103103 /// <summary>
104104 /// Creates a new machine of the specified <see cref="Type"/> and name, and with
@@ -110,8 +110,8 @@ public interface IMachineRuntime : IDisposable
110110 /// <param name="machineName">Optional machine name used for logging.</param>
111111 /// <param name="e">Optional event used during initialization.</param>
112112 /// <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 ) ;
115115
116116 /// <summary>
117117 /// Creates a new machine of the specified <see cref="Type"/>, using the specified
@@ -124,8 +124,8 @@ public interface IMachineRuntime : IDisposable
124124 /// <param name="type">Type of the machine.</param>
125125 /// <param name="e">Optional event used during initialization.</param>
126126 /// <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 ) ;
129129
130130 /// <summary>
131131 /// Creates a new machine of the specified <see cref="Type"/> and with the
@@ -136,9 +136,9 @@ public interface IMachineRuntime : IDisposable
136136 /// <param name="type">Type of the machine.</param>
137137 /// <param name="e">Optional event used during initialization.</param>
138138 /// <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>
140140 [ 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 ) ;
142142
143143 /// <summary>
144144 /// Creates a new machine of the specified <see cref="Type"/> and name, and with
@@ -150,9 +150,9 @@ public interface IMachineRuntime : IDisposable
150150 /// <param name="machineName">Optional machine name used for logging.</param>
151151 /// <param name="e">Optional event used during initialization.</param>
152152 /// <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>
154154 [ 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 ) ;
156156
157157 /// <summary>
158158 /// Creates a new machine of the specified <see cref="Type"/>, using the specified
@@ -165,40 +165,43 @@ public interface IMachineRuntime : IDisposable
165165 /// <param name="type">Type of the machine.</param>
166166 /// <param name="e">Optional event used during initialization.</param>
167167 /// <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>
169169 [ 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 ) ;
171171
172172 /// <summary>
173173 /// Sends an asynchronous <see cref="Event"/> to a machine.
174174 /// </summary>
175175 /// <param name="target">The id of the target machine.</param>
176176 /// <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 ) ;
179180
180181 /// <summary>
181182 /// 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.
183184 /// </summary>
184185 /// <param name="target">The id of the target machine.</param>
185186 /// <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>
187189 /// <returns>Task that represents the asynchronous operation. The task result is true if
188190 /// 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 ) ;
190192
191193 /// <summary>
192194 /// 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.
194196 /// </summary>
195197 /// <param name="target">The id of the target machine.</param>
196198 /// <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>
198201 /// <returns>Task that represents the asynchronous operation. The task result is true if
199202 /// the event was handled, false if the event was only enqueued.</returns>
200203 [ 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 ) ;
202205
203206 /// <summary>
204207 /// Registers a new specification monitor of the specified <see cref="Type"/>.
@@ -313,5 +316,10 @@ bool FairRandom(
313316 /// </summary>
314317 /// <param name="logger">The logger to install.</param>
315318 void SetLogger ( ILogger logger ) ;
319+
320+ /// <summary>
321+ /// Terminates the runtime and notifies each active machine to halt execution.
322+ /// </summary>
323+ void Stop ( ) ;
316324 }
317325}
0 commit comments