Files
RobustToolbox/Robust.Client/Console/Commands/DumpMetadataMembersCommand.cs
2022-11-06 03:00:57 +11:00

31 lines
782 B
C#

using System;
using Robust.Shared.Console;
using Robust.Shared.ContentPack;
namespace Robust.Client.Console.Commands
{
#if DEBUG
internal sealed class DumpMetadataMembersCommand : LocalizedCommands
{
public override string Command => "dmetamem";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var type = Type.GetType(args[0]);
if (type == null)
{
shell.WriteError("That type does not exist");
return;
}
foreach (var sig in AssemblyTypeChecker.DumpMetaMembers(type))
{
System.Console.WriteLine(@$"- ""{sig}""");
shell.WriteLine(sig);
}
}
}
#endif
}