mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 14:38:25 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,53 @@
|
|||
namespace Brutal.ImGuiApi.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Defines how a terminal action should be parsed
|
||||
/// </summary>
|
||||
public enum ArgParseMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Parse the command string args into individual tokens, considering whitespace and quotes
|
||||
/// </summary>
|
||||
Default,
|
||||
|
||||
/// <summary>
|
||||
/// Output the raw unparsed command arg string
|
||||
/// </summary>
|
||||
Unparsed,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An attribute which is used to define methods that can be registered as callback through a TerminalInterface
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class TerminalActionAttribute : Attribute
|
||||
{
|
||||
/// <param name="commandName">The command name</param>
|
||||
/// <param name="description">A description of the command</param>
|
||||
/// <param name="parsingMode">The type of parsing which should be used on the command</param>
|
||||
public TerminalActionAttribute(
|
||||
string commandName,
|
||||
string description = "",
|
||||
ArgParseMode parsingMode = ArgParseMode.Default
|
||||
)
|
||||
{
|
||||
CommandName = commandName.ToLower();
|
||||
Description = description;
|
||||
ParsingMode = parsingMode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The name of the command
|
||||
/// </summary>
|
||||
public string CommandName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A description of the command
|
||||
/// </summary>
|
||||
public string Description { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The parsing mode of the command
|
||||
/// </summary>
|
||||
public ArgParseMode ParsingMode { get; }
|
||||
}
|
||||
Loading…
Reference in a new issue