Files
RobustToolbox/Robust.Shared.Scripting/ILCommand.cs
Pieter-Jan Briers dfc4894c8b Dependencies update & cleanup (#5590)
* Dependencies update & cleanup

Fixes security vuln warnings etc

* Remove ILReader dependency

RIP in piss FastAccessors.
2025-01-08 02:19:27 +01:00

35 lines
766 B
C#

using Robust.Shared.Toolshed;
namespace Robust.Shared.Scripting;
[ToolshedCommand]
public sealed class ILCommand : ToolshedCommand
{
// Disabled due to relying on external dependency ILReader.
/*
[CommandImplementation("dumpil")]
public void DumpIL(
IInvocationContext ctx,
[PipedArgument] MethodInfo info
)
{
var reader = GetReader(info);
foreach (var instruction in reader)
{
if (instruction is null)
break;
ctx.WriteLine(instruction.ToString()!);
}
}
private IILReader GetReader(MethodBase method)
{
IILReaderConfiguration cfg = ILReader.Configuration.Resolve(method);
return cfg.GetReader(method);
}
*/
}