Skip to main content

CallbackHandle

A generic handle that invokes a cancellation callback when cancelled.

public sealed class CallbackHandle : IHandle

Namespace: DeadworksManaged.Api
Inherits / implements: IHandle
Source: Entities/CallbackHandle.cs#L4

Constructors​

new CallbackHandle()​

Signature

public CallbackHandle(Action cancel)

Source: Entities/CallbackHandle.cs#L8

Properties​

CallbackHandle.IsFinished​

Whether this subscription has completed or been cancelled.

Signature

public bool IsFinished { get; }

Source: Entities/CallbackHandle.cs#L10

Methods​

CallbackHandle.Cancel()​

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

Signature

public void Cancel()

Source: Entities/CallbackHandle.cs#L12

CallbackHandle.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

public IHandle CancelOnMapChange()

Source: Entities/CallbackHandle.cs#L20