/* 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; using System.Collections.ObjectModel; namespace dnSpy.Contracts.Debugger.DotNet.Evaluation.ExpressionCompiler { /// /// Alias kind /// public enum DbgDotNetAliasKind { /// /// An exception, eg. "$exception" /// Exception, /// /// A stowed exception, eg. "$stowedexception" /// StowedException, /// /// A return value, eg. "$ReturnValue", "$ReturnValue1" /// ReturnValue, /// /// A variable created by the user that doesn't exist in code /// Variable, /// /// An object ID, eg. "$1", "$3" /// ObjectId, } /// /// An alias (eg. return value, object id, etc) /// public struct DbgDotNetAlias { /// /// Alias kind /// public DbgDotNetAliasKind Kind; /// /// Custom type info understood by the EE or null /// public ReadOnlyCollection? CustomTypeInfo; /// /// Custom type info ID /// public Guid CustomTypeInfoId; /// /// Name, eg. "$ReturnValue", "$1" /// public string Name; /// /// Serialized type name, see /// public string Type; /// /// Constructor /// /// Alias kind /// Serialized type name, see /// Name, eg. "$ReturnValue", "$1" /// Custom type info ID /// Custom type info understood by the EE or null public DbgDotNetAlias(DbgDotNetAliasKind kind, string type, string name, Guid customTypeInfoId, ReadOnlyCollection? customTypeInfo) { Kind = kind; Type = type ?? throw new ArgumentNullException(nameof(type)); Name = name ?? throw new ArgumentNullException(nameof(name)); CustomTypeInfo = customTypeInfo; CustomTypeInfoId = customTypeInfoId; } } }