Table of Contents

Interface IRequestHandler<TRequestable, TRequestObject>

Namespace
Uncreated.Warfare.Interaction.Requests
Assembly
Uncreated.Warfare.dll

Handles a request for anything implementing IRequestable.

public interface IRequestHandler<in TRequestable, out TRequestObject> where TRequestable : IRequestable<out TRequestObject>

Type Parameters

TRequestable
TRequestObject

Methods

RequestAsync(WarfarePlayer, TRequestable?, IRequestResultHandler, CancellationToken)

Handles a request for anything implementing IRequestable.

[UsedImplicitly]
Task<bool> RequestAsync(WarfarePlayer player, TRequestable? requestable, IRequestResultHandler resultHandler, CancellationToken token = default)

Parameters

player WarfarePlayer
requestable TRequestable
resultHandler IRequestResultHandler
token CancellationToken

Returns

Task<bool>

true if the request was granted, otherwise false.