-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathArgumentParseFailedResult.cs
More file actions
40 lines (35 loc) · 1.26 KB
/
ArgumentParseFailedResult.cs
File metadata and controls
40 lines (35 loc) · 1.26 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
36
37
38
39
40
using Ultz.Extensions.Commands.Built;
using Ultz.Extensions.Commands.Context;
using Ultz.Extensions.Commands.Parsing.ArgumentParsers;
using Ultz.Extensions.Commands.Results.User;
namespace Ultz.Extensions.Commands.Results.Failed.Parsing
{
/// <summary>
/// Represents an argument parse failure.
/// </summary>
public sealed class ArgumentParseFailedResult : FailedResult
{
internal ArgumentParseFailedResult(CommandContext context, ArgumentParserResult parserResult)
{
Command = context.Command;
RawArguments = context.RawArguments;
ParserResult = parserResult;
}
/// <summary>
/// Gets the reason of this failed result.
/// </summary>
public override string Reason => ParserResult.Reason;
/// <summary>
/// Gets the <see cref="Built.Command" /> the parse failed for.
/// </summary>
public Command Command { get; }
/// <summary>
/// Gets the raw arguments.
/// </summary>
public string RawArguments { get; }
/// <summary>
/// Gets the result returned from <see cref="IArgumentParser.ParseAsync" />.
/// </summary>
public ArgumentParserResult ParserResult { get; }
}
}