/// <summary>
        /// <para>The event indicates that debugging of the debuggee has terminated. This does not mean that the debuggee itself has exited.</para>
        /// </summary>
        public static void SendTerminatedEvent(this ProtocolServer server)
        {
            TerminatedEvent terminatedEvent = new TerminatedEvent();

            server.SendMessage(terminatedEvent);
        }
        /// <summary>
        /// <para>The event indicates that debugging of the debuggee has terminated. This does not mean that the debuggee itself has exited.</para>
        /// </summary>
        /// <param name="body">
        /// <para>A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session.</para>
        /// <para>The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the 'launch' and 'attach' requests.</para>
        /// </param>
        public static void SendTerminatedEvent(this ProtocolServer server, Dictionary <string, object> restart = null)
        {
            TerminatedEvent terminatedEvent = new TerminatedEvent(new TerminatedEvent.TerminatedEventBody(restart));

            server.SendMessage(terminatedEvent);
        }
 private void Process_Exited(object sender, EventArgs e)
 {
     TerminatedEvent?.Invoke(process.ExitCode);
     logger.Debug("Process has terminated.");
 }