/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System; namespace dnSpy.Contracts.Debugger.Engine.Steppers { /// /// Steps into, over or out of a method. When closed, any non-completed call must be canceled. /// public abstract class DbgEngineStepper : DbgObject { /// /// Raised when the step is complete /// public abstract event EventHandler? StepComplete; /// /// Steps once. This method can be called again once is raised. /// This method is only called if the engine is paused. /// /// This value must be used when raising /// Step kind public abstract void Step(object? tag, DbgEngineStepKind step); /// /// Cancels the step, but does not raise /// /// Same value that was passed to public abstract void Cancel(object? tag); } /// /// Step complete event args /// public readonly struct DbgEngineStepCompleteEventArgs { /// /// Gets the thread or null to use the default thread that was used to create the stepper /// public DbgThread? Thread { get; } /// /// Gets the tag /// public object? Tag { get; } /// /// Gets the error message or null if none /// public string? Error { get; } /// /// true if the stepper was canceled by the engine /// public bool ForciblyCanceled { get; } /// /// Constructor /// /// Thread or null to use the default thread that was used to create the stepper /// Same value that was passed to /// Error message or null if none /// true if the stepper was canceled by the engine public DbgEngineStepCompleteEventArgs(DbgThread? thread, object? tag, string? error, bool forciblyCanceled) { Thread = thread; Tag = tag; Error = error; ForciblyCanceled = forciblyCanceled; } } }