feat(command): expose registration snapshots for inspection
This commit is contained in:
@@ -56,6 +56,9 @@ namespace ShrinkCommand
|
||||
RegisterBuiltInCommands();
|
||||
}
|
||||
|
||||
public IReadOnlyList<(string Path, MethodInfo Handler)> CaptureBindings() => _commands
|
||||
.Select(command => (command.Descriptor.Path, command.Handler.Method)).ToArray();
|
||||
|
||||
public IReadOnlyList<ShrinkCommandDescriptor> Commands => _commands
|
||||
.Select(command => command.Descriptor)
|
||||
.OrderBy(command => command.Path, StringComparer.OrdinalIgnoreCase)
|
||||
|
||||
Reference in New Issue
Block a user