/* 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 dnSpy.Contracts.Metadata; namespace dnSpy.Contracts.Documents { /// /// A reference to a .NET method body offset /// public sealed class DotNetMethodBodyReference { /// /// The offset is in an epilog /// public const uint EPILOG = 0xFFFFFFFF; /// /// The offset is in the prolog /// public const uint PROLOG = 0xFFFFFFFE; /// /// Gets the module /// public ModuleId Module { get; } /// /// Gets the token of a method within the module /// public uint Token { get; } /// /// Gets the IL offset in method body, or one of , /// public uint Offset { get; } /// /// Constructor /// /// Module /// Token of method /// IL offset in method body, or one of , public DotNetMethodBodyReference(ModuleId module, uint token, uint offset) { Module = module; Token = token; Offset = offset; } } /// /// A reference to a .NET definition (type, method, field, property, event, parameter) /// public sealed class DotNetTokenReference { /// /// Gets the module /// public ModuleId Module { get; } /// /// Gets the token /// public uint Token { get; } /// /// Constructor /// /// Module /// Token public DotNetTokenReference(ModuleId module, uint token) { Module = module; Token = token; } } }