Skip to content

Class ContextChain

Namespace: Void.Minecraft.Commands.Brigadier.Context
Assembly: Void.Minecraft.dll

public record ContextChain : IEquatable<ContextChain>

Inheritance

objectContextChain

Implements

IEquatable<ContextChain>

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

ContextChain(List<CommandContext>, CommandContext)

public ContextChain(List<CommandContext> Modifiers, CommandContext Executable)

Parameters

Modifiers List<CommandContext>

Executable CommandContext

Properties

Executable

public CommandContext Executable { get; init; }

Property Value

CommandContext

Modifiers

public List<CommandContext> Modifiers { get; init; }

Property Value

List<CommandContext>

NextStage

public ContextChain? NextStage { get; }

Property Value

ContextChain?

Stage

public ContextChain.ContextChainStage Stage { get; }

Property Value

ContextChain.ContextChainStage

TopContext

public CommandContext TopContext { get; }

Property Value

CommandContext

Methods

ExecuteAllAsync(ICommandSource, ResultConsumer, CancellationToken)

public ValueTask<int> ExecuteAllAsync(ICommandSource source, ResultConsumer resultConsumer, CancellationToken cancellationToken)

Parameters

source ICommandSource

resultConsumer ResultConsumer

cancellationToken CancellationToken

Returns

ValueTask<int>

RunExecutableAsync(CommandContext, ICommandSource, ResultConsumer, bool, CancellationToken)

public static ValueTask<int> RunExecutableAsync(CommandContext context, ICommandSource source, ResultConsumer resultConsumer, bool forkedMode, CancellationToken cancellationToken)

Parameters

context CommandContext

source ICommandSource

resultConsumer ResultConsumer

forkedMode bool

cancellationToken CancellationToken

Returns

ValueTask<int>

RunModifier(CommandContext, ICommandSource, ResultConsumer, bool)

public static IEnumerable<ICommandSource> RunModifier(CommandContext modifier, ICommandSource source, ResultConsumer resultConsumer, bool forkedMode)

Parameters

modifier CommandContext

source ICommandSource

resultConsumer ResultConsumer

forkedMode bool

Returns

IEnumerable<ICommandSource>

TryFlatten(CommandContext)

public static ContextChain? TryFlatten(CommandContext rootContext)

Parameters

rootContext CommandContext

Returns

ContextChain?