docs(CommandRegistration): add XML doc comments to Before/After fields and constructor

This commit is contained in:
2026-06-21 12:18:19 +02:00
parent beedb8db5b
commit 912a78a689
+16
View File
@@ -1,10 +1,26 @@
namespace CommandHook;
/// <summary>
/// The pair of callbacks a listener provides for a command. Either one can be null.
/// </summary>
public struct CommandRegistration
{
/// <summary>
/// Called before the command runs. Set <see cref="CommandData.Cancel"/> on
/// <paramref name="data"/> via the ref parameter inside your delegate to stop
/// the command from executing and skip any remaining Before listeners.
/// </summary>
public readonly CommandBeforeDelegate? Before;
/// <summary>
/// Called after the command runs, with its result. Not called if a Before
/// listener cancelled the command.
/// </summary>
public readonly CommandAfterDelegate? After;
/// <summary>
/// Creates a registration. Pass null for either delegate to only hook one side.
/// </summary>
public CommandRegistration(CommandBeforeDelegate? before, CommandAfterDelegate? after)
{
Before = before;