From 912a78a689940f076885a85711f913751ad95708 Mon Sep 17 00:00:00 2001 From: anth64 Date: Sun, 21 Jun 2026 12:18:19 +0200 Subject: [PATCH] docs(CommandRegistration): add XML doc comments to Before/After fields and constructor --- CommandHook/CommandRegistration.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CommandHook/CommandRegistration.cs b/CommandHook/CommandRegistration.cs index 610281d..e704474 100644 --- a/CommandHook/CommandRegistration.cs +++ b/CommandHook/CommandRegistration.cs @@ -1,10 +1,26 @@ namespace CommandHook; +/// +/// The pair of callbacks a listener provides for a command. Either one can be null. +/// public struct CommandRegistration { + /// + /// Called before the command runs. Set on + /// via the ref parameter inside your delegate to stop + /// the command from executing and skip any remaining Before listeners. + /// public readonly CommandBeforeDelegate? Before; + + /// + /// Called after the command runs, with its result. Not called if a Before + /// listener cancelled the command. + /// public readonly CommandAfterDelegate? After; + /// + /// Creates a registration. Pass null for either delegate to only hook one side. + /// public CommandRegistration(CommandBeforeDelegate? before, CommandAfterDelegate? after) { Before = before;