Table of Contents

Class EventContinuations

Namespace
Uncreated.Warfare.Events
Assembly
Uncreated.Warfare.dll
public static class EventContinuations
Inheritance
EventContinuations
Inherited Members

Methods

Dispatch<TArgs>(TArgs, EventDispatcher, CancellationToken, out bool, CancellableEventContinuationAsync<TArgs>)

Try to execute an 'on requested' event on the main thread and if a context switch is required, run continuation after the event is done executing.

public static void Dispatch<TArgs>(TArgs eventArgs, EventDispatcher eventDispatcher, CancellationToken token, out bool shouldAllow, CancellableEventContinuationAsync<TArgs> continuation) where TArgs : class, ICancellable

Parameters

eventArgs TArgs
eventDispatcher EventDispatcher
token CancellationToken
shouldAllow bool
continuation CancellableEventContinuationAsync<TArgs>

Type Parameters

TArgs

Dispatch<TArgs>(TArgs, EventDispatcher, CancellationToken, out bool, CancellableEventContinuationAsync<TArgs>, Func<TArgs, bool>)

Try to execute an 'on requested' event on the main thread and if a context switch is required, run continuation after the event is done executing.

public static void Dispatch<TArgs>(TArgs eventArgs, EventDispatcher eventDispatcher, CancellationToken token, out bool shouldAllow, CancellableEventContinuationAsync<TArgs> continuation, Func<TArgs, bool> needsToContinue) where TArgs : class, ICancellable

Parameters

eventArgs TArgs
eventDispatcher EventDispatcher
token CancellationToken
shouldAllow bool
continuation CancellableEventContinuationAsync<TArgs>
needsToContinue Func<TArgs, bool>

Type Parameters

TArgs

Remarks

This overload allows you to continue even if the task ends in time.

Dispatch<TArgs>(TArgs, EventDispatcher, CancellationToken, out bool, CancellableEventContinuation<TArgs>)

Try to execute an 'on requested' event on the main thread and if a context switch is required, run continuation after the event is done executing.

public static void Dispatch<TArgs>(TArgs eventArgs, EventDispatcher eventDispatcher, CancellationToken token, out bool shouldAllow, CancellableEventContinuation<TArgs> continuation) where TArgs : class, ICancellable

Parameters

eventArgs TArgs
eventDispatcher EventDispatcher
token CancellationToken
shouldAllow bool
continuation CancellableEventContinuation<TArgs>

Type Parameters

TArgs

Dispatch<TArgs>(TArgs, EventDispatcher, CancellationToken, out bool, CancellableEventContinuation<TArgs>, Func<TArgs, bool>)

Try to execute an 'on requested' event on the main thread and if a context switch is required, run continuation after the event is done executing.

public static void Dispatch<TArgs>(TArgs eventArgs, EventDispatcher eventDispatcher, CancellationToken token, out bool shouldAllow, CancellableEventContinuation<TArgs> continuation, Func<TArgs, bool> needsToContinue) where TArgs : class, ICancellable

Parameters

eventArgs TArgs
eventDispatcher EventDispatcher
token CancellationToken
shouldAllow bool
continuation CancellableEventContinuation<TArgs>
needsToContinue Func<TArgs, bool>

Type Parameters

TArgs

Remarks

This overload allows you to continue even if the task ends in time.