Show / Hide Table of Contents

Class ClientManagerAdapterBase<TKey, TClient>

Base implementation of a client manager adapter with keys that implement IGameConnect.

Inheritance
object
ClientManagerAdapterBase<TKey, TClient>
DeviceConsoleClientManagerAdapter<TClient, TClientOptions>
PhoenixClientManagerAdapter<TClient, TClientOptions>
Implements
IClientManagerAdapter<TKey, TClient>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.ClientManager
Assembly: ClientManager.dll
Syntax
public abstract class ClientManagerAdapterBase<TKey, TClient> : IClientManagerAdapter<TKey, TClient> where TKey : notnull where TClient : class, IGameConnect
Type Parameters
Name Description
TKey

The key object that contains the TClient.

TClient

The client type.

Remarks

Initializes a new instance of the ClientManagerAdapterBase<TKey, TClient> class.

Constructors

View Source

ClientManagerAdapterBase(ILogger<ClientManagerAdapterBase<TKey, TClient>>?)

Base implementation of a client manager adapter with keys that implement IGameConnect.

Declaration
protected ClientManagerAdapterBase(ILogger<ClientManagerAdapterBase<TKey, TClient>>? logger = null)
Parameters
Type Name Description
ILogger<ClientManagerAdapterBase<TKey, TClient>> logger

The logger.

Remarks

Initializes a new instance of the ClientManagerAdapterBase<TKey, TClient> class.

Methods

View Source

ConnectAsync(TClient, CancellationOptions?)

Connects a client to a game instance.

Declaration
public virtual ValueTask ConnectAsync(TClient client, CancellationOptions? co = null)
Parameters
Type Name Description
TClient client

The client to connect.

CancellationOptions? co

The Microsoft.XboxStudios.Bifrost.CancellationOptions.

Returns
Type Description
ValueTask

A Task that represents the asynchronous operation.

View Source

CreateFor(TKey)

Gets the client for a specific TKey.

Declaration
public abstract TClient? CreateFor(TKey key)
Parameters
Type Name Description
TKey key

The key to use.

Returns
Type Description
TClient

The client assosciated with the requested key.

View Source

Disconnect(TClient)

Disconnects a client from a game instance synchronously.

Declaration
public void Disconnect(TClient client)
Parameters
Type Name Description
TClient client

The client to disconnect.

View Source

DisconnectAsync(TClient)

Disconnects a client from a game instance asynchronously.

Declaration
public virtual ValueTask DisconnectAsync(TClient client)
Parameters
Type Name Description
TClient client

The client to disconnect.

Returns
Type Description
ValueTask

A Task that represents the asynchronous operation.

View Source

LogException(TClient?, Exception)

A log method used to log exceptions when connecting or disconnecting clients.

Declaration
public virtual void LogException(TClient? client, Exception e)
Parameters
Type Name Description
TClient client

The client that experienced the exception.

Exception e

The exception that was thrown.

View Source

NeedsToConnect(TClient)

Checks whether a client needs to connect or not.

Declaration
public bool NeedsToConnect(TClient client)
Parameters
Type Name Description
TClient client

The client to check for.

Returns
Type Description
bool

True if client needs to connect. False otherwise.

Implements

IClientManagerAdapter<TKey, TClient>
  • View Source
In this article
Back to top Generated by DocFX