Skip to main content

IProjectVLobbyPresenter interface

Lower-level Lobby state source. Most screens should use IProjectVLobbyScreen, which loads and redraws for you.

Namespace: SilverTiger.ProjectV.Unity.Presentation.Lobby

public interface IProjectVLobbyPresenter

Properties​

PropertyTypeDescription
CurrentProjectVLobbySnapshotThe latest Lobby state; never null.

Methods​

SubscribeAsync(Action<ProjectVLobbySnapshot> listener)​

Calls listener right away with Current, then again with each new snapshot. Updates may arrive off the Unity main thread.

Task<IDisposable> SubscribeAsync(Action<ProjectVLobbySnapshot> listener);

Parameters

NameTypeDescription
listenerAction<ProjectVLobbySnapshot>Called with each snapshot. An exception it throws on a later update is ignored.

Returns

Task<IDisposable>: A subscription; dispose it to stop receiving updates.

Exceptions

ExceptionWhen
ArgumentNullExceptionlistener is null.
ObjectDisposedExceptionThe presenter was already disposed.

RefreshAsync(CancellationToken cancellationToken)​

Loads the player's profile and level, publishing ProjectVLobbyStatus.Refreshing and then the result to subscribers. Calls run one at a time. A failure does not throw; it is in the result.

Task<ProjectVLobbyCommandResult> RefreshAsync(CancellationToken cancellationToken);

Parameters

NameTypeDescription
cancellationTokenCancellationTokenCancels the load; the result then fails with a cancelled error.

Returns

Task<ProjectVLobbyCommandResult>: The new state. ProjectVLobbyCommandResult.IsSuccess is false when the load failed, was cancelled, or the player signed out meanwhile.

Exceptions

ExceptionWhen
ObjectDisposedExceptionThe presenter was already disposed.