docs(CommandRegistration): add XML doc comments to Before/After fields and constructor
This commit is contained in:
@@ -1,10 +1,26 @@
|
|||||||
namespace CommandHook;
|
namespace CommandHook;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The pair of callbacks a listener provides for a command. Either one can be null.
|
||||||
|
/// </summary>
|
||||||
public struct CommandRegistration
|
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;
|
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;
|
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)
|
public CommandRegistration(CommandBeforeDelegate? before, CommandAfterDelegate? after)
|
||||||
{
|
{
|
||||||
Before = before;
|
Before = before;
|
||||||
|
|||||||
Reference in New Issue
Block a user