Skip to content

Interface IEventService

Namespace: Void.Proxy.Api.Events.Services
Assembly: Void.Proxy.Api.dll

public interface IEventService

Properties

Listeners

IEnumerable<IEventListener> Listeners { get; }

Property Value

IEnumerable<IEventListener>

Methods

RegisterListeners(IEnumerable<IEventListener>, CancellationToken)

void RegisterListeners(IEnumerable<IEventListener> listeners, CancellationToken cancellationToken = default)

Parameters

listeners IEnumerable<IEventListener>

cancellationToken CancellationToken

RegisterListeners(CancellationToken, params IEventListener[])

void RegisterListeners(CancellationToken cancellationToken = default, params IEventListener[] listeners)

Parameters

cancellationToken CancellationToken

listeners IEventListener[]

RegisterListeners(params IEventListener[])

void RegisterListeners(params IEventListener[] listeners)

Parameters

listeners IEventListener[]

ThrowAsync<T>(CancellationToken)

ValueTask ThrowAsync<T>(CancellationToken cancellationToken = default) where T : IEvent, new()

Parameters

cancellationToken CancellationToken

Returns

ValueTask

Type Parameters

T

ThrowAsync<T>(T, CancellationToken)

ValueTask ThrowAsync<T>(T @event, CancellationToken cancellationToken = default) where T : IEvent

Parameters

event T

cancellationToken CancellationToken

Returns

ValueTask

Type Parameters

T

ThrowWithResultAsync<TResult>(IEventWithResult<TResult>, CancellationToken)

ValueTask<TResult?> ThrowWithResultAsync<TResult>(IEventWithResult<TResult> @event, CancellationToken cancellationToken = default)

Parameters

event IEventWithResult<TResult>

cancellationToken CancellationToken

Returns

ValueTask<TResult?>

Type Parameters

TResult

ThrowWithResultAsync<T, TResult>(CancellationToken)

ValueTask<TResult?> ThrowWithResultAsync<T, TResult>(CancellationToken cancellationToken = default) where T : IEventWithResult<TResult?>, new()

Parameters

cancellationToken CancellationToken

Returns

ValueTask<TResult?>

Type Parameters

T

TResult

UnregisterListeners(IEnumerable<IEventListener>)

void UnregisterListeners(IEnumerable<IEventListener> listeners)

Parameters

listeners IEnumerable<IEventListener>

UnregisterListeners(params IEventListener[])

void UnregisterListeners(params IEventListener[] listeners)

Parameters

listeners IEventListener[]

WaitAsync(Func<IEvent, bool>, CancellationToken)

ValueTask WaitAsync(Func<IEvent, bool> condition, CancellationToken cancellationToken = default)

Parameters

condition Func<IEvent, bool>

cancellationToken CancellationToken

Returns

ValueTask