Table of Contents

Class ClientFeatureModuleBase

Namespace
Shard.Gameplay.Universe.Modules.ClientFeatures
Assembly
Shard.Gameplay.Universe.dll

Declares one client capability during setup and owns no runtime lifecycle work.

public abstract class ClientFeatureModuleBase : BaseModule, IModule
Inheritance
ClientFeatureModuleBase
Implements
Derived
Inherited Members

Remarks

Gameplay behavior needs its own owner rather than adding fallible work to these declarations.

Constructors

ClientFeatureModuleBase(string, ClientFeature, IReadOnlyCollection<string>?)

Declares one client capability during setup and owns no runtime lifecycle work.

protected ClientFeatureModuleBase(string name, ClientFeature capability, IReadOnlyCollection<string>? clientTags = null)

Parameters

name string
capability ClientFeature
clientTags IReadOnlyCollection<string>

Remarks

Gameplay behavior needs its own owner rather than adding fallible work to these declarations.

Properties

Manifest

Gets the module's identity and dependency declaration.

public override sealed ModuleManifest Manifest { get; }

Property Value

ModuleManifest

Methods

OnPreloadAsync(CancellationToken)

Performs asynchronous preload work that must complete before this module can start.

protected override sealed Task OnPreloadAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A token that is canceled when server startup is interrupted.

Returns

Task

A task representing the asynchronous preload operation.

OnQuiesceAsync()

Stops new work and completes work already accepted by the module.

protected override sealed Task OnQuiesceAsync()

Returns

Task

OnSetup()

Called during synchronous module setup after the module context has been assigned.

protected override sealed void OnSetup()

OnShutdown()

Called in reverse load order after quiescence. This hook is skipped if setup does not complete; use IDisposable for cleanup required on every ownership path.

protected override sealed void OnShutdown()

OnStart()

Called after preload and required dependencies start. The ready event is published after all eligible start hooks and failed or blocked module cleanup finish.

protected override sealed void OnStart()