Class CommandSyntaxFormatter
- Namespace
- Uncreated.Warfare.Interaction.Commands.Syntax
- Assembly
- Uncreated.Warfare.dll
public class CommandSyntaxFormatter : IDisposable
- Inheritance
-
CommandSyntaxFormatter
- Implements
- Inherited Members
Constructors
CommandSyntaxFormatter(ISyntaxWriter, UserPermissionStore)
[ActivatorUtilitiesConstructor]
public CommandSyntaxFormatter(ISyntaxWriter syntaxWriter, UserPermissionStore permissionStore)
Parameters
syntaxWriterISyntaxWriterpermissionStoreUserPermissionStore
CommandSyntaxFormatter(ISyntaxWriter, UserPermissionStore?, string?, bool)
public CommandSyntaxFormatter(ISyntaxWriter syntaxWriter, UserPermissionStore? permissionStore, string? prefix, bool leaveOpen = false)
Parameters
syntaxWriterISyntaxWriterpermissionStoreUserPermissionStoreprefixstringleaveOpenbool
Fields
Verbatim
public const string Verbatim = "Verbatim"
Field Value
Properties
SyntaxWriter
public ISyntaxWriter SyntaxWriter { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
GetRichDescription(ICommandParameterDescriptor, ICommandFlagDescriptor?, ISyntaxWriter, LanguageInfo?)
Enriches a description string with tags like caller, target, param, etc.
public string? GetRichDescription(ICommandParameterDescriptor parameter, ICommandFlagDescriptor? flag, ISyntaxWriter writer, LanguageInfo? language)
Parameters
parameterICommandParameterDescriptorflagICommandFlagDescriptorwriterISyntaxWriterlanguageLanguageInfo
Returns
GetSyntaxString(ICommandDescriptor, IReadOnlyList<string>, string?, ICommandUser?, string?, CancellationToken)
Creates a syntax string that describes the requires arguments from the meta file.
public ValueTask<CommandSyntaxFormatter.SyntaxStringInfo> GetSyntaxString(ICommandDescriptor command, IReadOnlyList<string> args, string? flag, ICommandUser? user, string? aliasOverride = null, CancellationToken token = default)
Parameters
commandICommandDescriptorargsIReadOnlyList<string>flagstringuserICommandUseraliasOverridestringtokenCancellationToken