Exemplo n.º 1
0
 /// <summary>
 ///   Exits from current process or from current call. If called directly from a process
 ///   body, then the process is stopped and the optional exit value can be found on <see
 ///   cref="SimProcess.Value"/>. Otherwise, if this method is called from a procedure body,
 ///   then the procedure is stopped and the optional exit value can be found on the event
 ///   returned by <see cref="Call"/>.
 /// </summary>
 /// <param name="value">The optional exit value.</param>
 /// <returns>The exit event that can be yielded to stop a process or a call.</returns>
 public SimEvent Exit(object value)
 {
     ActiveProcess.SetExitValue(value);
     return(EndEvent);
 }
Exemplo n.º 2
0
 /// <summary>
 ///   Exits from current process or from current call. If called directly from a process
 ///   body, then the process is stopped and the optional exit value can be found on <see
 ///   cref="SimProcess.Value"/>. Otherwise, if this method is called from a procedure body,
 ///   then the procedure is stopped.
 /// </summary>
 /// <returns>The exit event that can be yielded to stop a process or a call.</returns>
 public SimEvent Exit()
 {
     ActiveProcess.SetExitValue(Default.Value);
     return(EndEvent);
 }