Skip to main content

IHandle

A handle to a cancellable subscription — returned by timers, game-event listeners, net-message hooks, entity I/O hooks, and any other API that registers a long-lived callback. Allows cancellation and status checking.

public interface IHandle

Namespace: DeadworksManaged.Api
Derived types: CallbackHandle
Source: Timer/IHandle.cs#L8

Properties​

IHandle.IsFinished​

Whether this subscription has completed or been cancelled.

Signature

bool IsFinished { get; }

Source: Timer/IHandle.cs#L14

Methods​

IHandle.Cancel()​

Cancel this subscription. If already finished or cancelled, this is a no-op.

Signature

void Cancel()

Source: Timer/IHandle.cs#L11

IHandle.CancelOnMapChange()​

Marks this subscription to be automatically cancelled on map change (when OnStartupServer fires). Primarily meaningful for timers; non-timer handles typically return themselves unchanged. Returns the handle itself for fluent chaining.

Signature

IHandle CancelOnMapChange()

Source: Timer/IHandle.cs#L21