/*
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 dnSpy.Contracts.Disassembly;
namespace dnSpy.Contracts.Debugger.DotNet.Disassembly {
///
/// Contains the code that will be disassembled
///
public readonly struct DbgDotNetNativeCode {
///
/// Gets the code kind
///
public NativeCodeKind Kind { get; }
///
/// Gets the optimization kind
///
public NativeCodeOptimization Optimization { get; }
///
/// All blocks to disassemble
///
public DbgDotNetNativeCodeBlock[] Blocks { get; }
///
/// Extra optional info, or null if none
///
public NativeCodeInfo? CodeInfo { get; }
///
/// Method name or null
///
public string? MethodName { get; }
///
/// Short method name or null
///
public string? ShortMethodName { get; }
///
/// Module name or null
///
public string? ModuleName { get; }
///
/// Constructor
///
/// Code kind
/// Optimization kind
/// All blocks to disassemble
/// Extra code info or null
/// Method name or null
/// Short method name or null
/// Module name or null
public DbgDotNetNativeCode(NativeCodeKind kind, NativeCodeOptimization optimization, DbgDotNetNativeCodeBlock[] blocks, NativeCodeInfo? codeInfo, string? methodName, string? shortMethodName, string? moduleName) {
Kind = kind;
Optimization = optimization;
Blocks = blocks ?? throw new ArgumentNullException(nameof(blocks));
CodeInfo = codeInfo;
MethodName = methodName;
ShortMethodName = shortMethodName;
ModuleName = moduleName;
}
}
}