Class Suggestions
Namespace: Void.Minecraft.Commands.Brigadier.Suggestion
Assembly: Void.Minecraft.dll
Contains normalized, sorted suggestions sharing a replacement range.
public record Suggestions : IEquatable<Suggestions>Inheritance
Implements
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Suggestions(StringRange, List<Suggestion>)
Contains normalized, sorted suggestions sharing a replacement range.
public Suggestions(StringRange Range, List<Suggestion> All)Parameters
Range StringRange
The common replacement range.
All List<Suggestion>
The suggestion list.
Properties
All
The suggestion list.
public List<Suggestion> All { get; init; }Property Value
Empty
Gets the shared empty suggestion result at position zero.
public static Suggestions Empty { get; }Property Value
IsEmpty
Gets whether the list contains no suggestions.
public bool IsEmpty { get; }Property Value
Range
The common replacement range.
public StringRange Range { get; init; }Property Value
Methods
Create(string, IEnumerable<Suggestion>)
Deduplicates, range-normalizes, and ordinally sorts suggestions.
public static Suggestions Create(string command, IEnumerable<Suggestion> suggestions)Parameters
command string
The complete command input.
suggestions IEnumerable<Suggestion>
The suggestions to normalize.
Returns
The normalized result, or
EmptyAsync()
Returns the shared empty result as a completed asynchronous value.
public static ValueTask<Suggestions> EmptyAsync()Returns
A completed value containing
Merge(string, IEnumerable<Suggestions>)
Merges suggestion sets and normalizes their replacement ranges.
public static Suggestions Merge(string command, IEnumerable<Suggestions> input)Parameters
command string
The complete command input.
input IEnumerable<Suggestions>
The suggestion sets.
Returns
The empty result, the sole input instance, or a merged result.