Table of Contents

Class AsyncPlayerCommandBase

Namespace
Shard.Gameplay.Universe.World.Commands
Assembly
Shard.Gameplay.Universe.dll

Asynchronous command requiring the invoking Player's current World.

public abstract class AsyncPlayerCommandBase : AsyncCommandBase, IAsyncCommand, ICommand
Inheritance
AsyncPlayerCommandBase
Implements
Inherited Members

Remarks

Execution begins only after the exact Player world binding is validated. Implementations receive no Flecs handles and must open a fresh synchronous borrow for each ECS operation after an await. The method body starts on the World thread, so work before its first incomplete await must remain short.

Constructors

AsyncPlayerCommandBase(string, string, params string[])

Asynchronous command requiring the invoking Player's current World.

protected AsyncPlayerCommandBase(string name, string description, params string[] aliases)

Parameters

name string
description string
aliases string[]

Remarks

Execution begins only after the exact Player world binding is validated. Implementations receive no Flecs handles and must open a fresh synchronous borrow for each ECS operation after an await. The method body starts on the World thread, so work before its first incomplete await must remain short.

Methods

ExecuteAsync(CommandContext, Player, World, CancellationToken)

protected abstract ValueTask ExecuteAsync(CommandContext context, Player player, World world, CancellationToken cancellationToken)

Parameters

context CommandContext
player Player
world World
cancellationToken CancellationToken

Returns

ValueTask

ExecuteAsync(CommandContext, CancellationToken)

public override sealed ValueTask ExecuteAsync(CommandContext context, CancellationToken cancellationToken)

Parameters

context CommandContext
cancellationToken CancellationToken

Returns

ValueTask