public void Resuming() { Contract.Assert(isPaused); isPaused = false; ResumeEvent.Set(); }
internal static void Run(Version ver, bool batch, bool rc, IEnumerable <string> commands, IEnumerable <string> files) { if (!Configuration.Read()) { Configuration.Defaults(); } Configuration.Apply(); var dbFile = Configuration.Current.DefaultDatabaseFile; if (Configuration.Current.LoadDatabaseAutomatically && !string.IsNullOrWhiteSpace(dbFile)) { FileInfo file; try { file = new FileInfo(dbFile); } catch (Exception ex) { Log.Error("Could not open database file '{0}':", dbFile); Log.Error(ex.ToString()); return; } Debugger.Read(file); } Log.Notice("Welcome to the Mono soft debugger (sdb {0})", ver); Log.Notice("Type 'help' for a list of commands or 'quit' to exit"); Log.Info(string.Empty); Root.AddCommands(Plugins.LoadDefault()); var rcFile = GetFilePath(); if (rc && File.Exists(rcFile)) { RunFile(rcFile, true); } foreach (var file in files) { if (File.Exists(file)) { RunFile(file, true); } } RunCommands(commands); while (!Stop) { // If the command caused the debuggee to start // or resume execution, wait for it to suspend. if (InferiorExecuting) { ResumeEvent.WaitOne(); InferiorExecuting = false; } string cmd; // We use a queue here so that batch commands are // also subject to the suspension check above. It // also makes things easier since everything gets // executed in one thread. if (_queue.TryDequeue(out cmd)) { Process(cmd, true); } else if (batch) { Stop = true; } else { cmd = _lineEditor != null? _lineEditor.Edit(GetPrompt(), string.Empty) : LibEdit.ReadLine(GetPrompt()); // Did we get EOF? if (cmd == null) { Log.Info(string.Empty); if (Debugger.State != State.Exited) { Log.Error("An inferior process is active"); } else { Stop = true; } } else { Process(cmd, false); } } } // Clean up just in case. UnsetControlCHandler(); dbFile = Configuration.Current.DefaultDatabaseFile; if (Configuration.Current.SaveDatabaseAutomatically && !string.IsNullOrWhiteSpace(dbFile)) { FileInfo file; try { file = new FileInfo(dbFile); } catch (Exception ex) { Log.Error("Could not open database file '{0}':", dbFile); Log.Error(ex.ToString()); return; } Debugger.Write(file); } // Let's not leave dead Mono processes behind... Debugger.Pause(); Debugger.Kill(); while (!Debugger.DebuggeeKilled) { Thread.Sleep(10); } Log.Notice("Bye"); }
private ResumeEventViewModel ViewModel(ResumeEvent resumeEvent) => _context.Map(resumeEvent);
private static void Update(UpdateResumeEventCommand message, ResumeEvent resumeEvent) { resumeEvent.DateRange.Update(message.DateRange.StartDate, message.DateRange.EndDate); resumeEvent.Update(message.Name, message.Message); }
private ResumeEventViewModel ViewModel(ResumeEvent resumeEvent) { return(_context.Map(resumeEvent)); }
void OnResumeEvent(ResumeEvent e) { this.Resume(); }
protected virtual void OnResumeEvent(EventArgs args) { ResumeEvent?.Invoke(this, args); }
private async Task Save(ResumeEvent resumeEvent) { _dbContext.ResumeEvents.Add(resumeEvent); await _dbContext.SaveChangesAsync(); }
/// <summary> /// Constructor. /// </summary> /// <param name="resumeEvent">The delegate to resume event.</param> internal SuspendPropertyChangedEvent([NotNull] ResumeEvent resumeEvent) { _resumeEvent = resumeEvent; }
public void Resuming() { Debug.Assert(isPaused); isPaused = false; ResumeEvent.Set(); }
public void Resume() { PauseEvent.Reset(); ResumeEvent.Set(); }
public void Pause() { ResumeEvent.Reset(); PauseEvent.Set(); }
void IResumeReportsCommand.CreateResumeEvent(ResumeEvent evt) { evt.Prepare(); evt.Validate(); _repository.CreateResumeEvent(evt); }