private void Processor_ProcessorHalted(object sender, ProcessorHaltEventArgs e) { IsRunning = false; switch (e.Reason) { case ProcessorHaltReason.Halt: MachineEvents.InvokeMachineHaltedEvent(new MachineHaltedEventArgs() { Reason = MachineHaltReason.ProcessorHalt }); ClearState(); break; case ProcessorHaltReason.Crash: MachineEvents.InvokeMachineHaltedEvent(new MachineHaltedEventArgs() { Reason = MachineHaltReason.Crash, CrashException = e.CrashException }); break; } }
/// <summary> /// Sends <see cref="MachineEvents.MachineReboot"/> event to reboot machine /// </summary> public static void RebootExistingInstance() { MachineEvents.InvokeMachineRebootEvent(); }