/* 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.Globalization; using dnSpy.Contracts.Debugger.Evaluation; using dnSpy.Contracts.Debugger.Text; namespace dnSpy.Contracts.Debugger.Engine.Evaluation { /// /// Formats names, types, values, stack frames /// public abstract class DbgEngineFormatter { /// /// Formats an exception name /// /// Evaluation context /// Output /// Exception id public abstract void FormatExceptionName(DbgEvaluationContext context, IDbgTextWriter output, uint id); /// /// Formats a stowed exception name /// /// Evaluation context /// Output /// Stowed exception id public abstract void FormatStowedExceptionName(DbgEvaluationContext context, IDbgTextWriter output, uint id); /// /// Formats a return value name /// /// Evaluation context /// Output /// Return value id public abstract void FormatReturnValueName(DbgEvaluationContext context, IDbgTextWriter output, uint id); /// /// Formats an object ID name /// /// Evaluation context /// Output /// Object id public abstract void FormatObjectIdName(DbgEvaluationContext context, IDbgTextWriter output, uint id); /// /// Formats a stack frame /// /// Evaluation info /// Output /// Stack frame options /// Value option /// Culture or null to use invariant culture public abstract void FormatFrame(DbgEvaluationInfo evalInfo, IDbgTextWriter output, DbgStackFrameFormatterOptions options, DbgValueFormatterOptions valueOptions, CultureInfo? cultureInfo); /// /// Formats a value /// /// Evaluation info /// Output /// Value to format /// Options /// Culture or null to use invariant culture public abstract void FormatValue(DbgEvaluationInfo evalInfo, IDbgTextWriter output, DbgEngineValue value, DbgValueFormatterOptions options, CultureInfo? cultureInfo); /// /// Formats a value's type /// /// Evaluation info /// Output /// Value to format /// Options /// Culture or null to use invariant culture public abstract void FormatType(DbgEvaluationInfo evalInfo, IDbgTextWriter output, DbgEngineValue value, DbgValueFormatterTypeOptions options, CultureInfo? cultureInfo); } }