-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCommandExecutedEventArgs.cs
More file actions
35 lines (32 loc) · 1.25 KB
/
CommandExecutedEventArgs.cs
File metadata and controls
35 lines (32 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using Ultz.Extensions.Commands.Built;
using Ultz.Extensions.Commands.Context;
using Ultz.Extensions.Commands.Results.User;
namespace Ultz.Extensions.Commands.Events
{
/// <summary>
/// Represents the event data for when a command was executed.
/// </summary>
public sealed class CommandExecutedEventArgs : EventArgs
{
/// <summary>
/// Initialises a new <see cref="CommandExecutedEventArgs" />.
/// </summary>
/// <param name="result"> The <see cref="CommandResult" /> from the <see cref="Command" />. </param>
/// <param name="context"> The <see cref="CommandContext" /> used for execution. </param>
public CommandExecutedEventArgs(CommandResult result, CommandContext context)
{
Result = result;
Context = context;
}
/// <summary>
/// Gets the <see cref="CommandResult" /> of the <see cref="Command" />.
/// <see langword="null" /> if the <see cref="Command" /> did not return anything.
/// </summary>
public CommandResult Result { get; }
/// <summary>
/// Gets the <see cref="CommandContext" /> used for execution.
/// </summary>
public CommandContext Context { get; }
}
}