-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathIgnoresExtraArgumentsAttribute.cs
More file actions
36 lines (33 loc) · 1.19 KB
/
IgnoresExtraArgumentsAttribute.cs
File metadata and controls
36 lines (33 loc) · 1.19 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
using System;
using Ultz.Extensions.Commands.Built;
namespace Ultz.Extensions.Commands.Attributes
{
/// <summary>
/// Sets whether to ignore extra arguments for the <see cref="Module" /> or <see cref="Command" />.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public sealed class IgnoresExtraArgumentsAttribute : Attribute
{
/// <summary>
/// Initialises a new <see cref="IgnoresExtraArgumentsAttribute" /> with <see cref="Value" /> set to
/// <see langword="true" />.
/// </summary>
public IgnoresExtraArgumentsAttribute()
{
Value = true;
}
/// <summary>
/// Initialises a new <see cref="IgnoresExtraArgumentsAttribute" /> with the specified
/// <paramref name="ignoreExtraArguments" />.
/// </summary>
/// <param name="ignoreExtraArguments"> The value to set. </param>
public IgnoresExtraArgumentsAttribute(bool ignoreExtraArguments)
{
Value = ignoreExtraArguments;
}
/// <summary>
/// Gets whether to ignore extra arguments.
/// </summary>
public bool Value { get; }
}
}