Show / Hide Table of Contents

Class GameClientManager

A class for managing various game clients.

Inheritance
object
BindableBase
GameClientManager
Implements
INotifyPropertyChanged
Inherited Members
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.Internal.Studios.Aruba.Infrastructure
Assembly: Aruba.Infrastructure.dll
Syntax
public class GameClientManager : BindableBase, INotifyPropertyChanged

Properties

View Source

AllDevices

Gets or sets the list of all devices.

Declaration
public List<IGameDevice> AllDevices { get; set; }
Property Value
Type Description
List<IGameDevice>
View Source

BugDevicesDictionary

Gets the dictionary containing the devices associated with each bug being created.

Declaration
public ConcurrentDictionary<Guid, IBugDevices> BugDevicesDictionary { get; }
Property Value
Type Description
ConcurrentDictionary<Guid, IBugDevices>
View Source

GameClients

Gets the GameClients (TitleName, {GameClientConnectionContext, GameClient})

Declaration
public ConcurrentDictionary<string, Dictionary<GameClientConnectionContext, IGameClient>> GameClients { get; }
Property Value
Type Description
ConcurrentDictionary<string, Dictionary<GameClientConnectionContext, IGameClient>>
View Source

Instance

Gets the single static instance of the class.

Declaration
public static GameClientManager Instance { get; }
Property Value
Type Description
GameClientManager
View Source

SelectedDevices

Gets or sets the list of selected devices.

Declaration
public List<IGameDevice> SelectedDevices { get; set; }
Property Value
Type Description
List<IGameDevice>

Methods

View Source

AddBugDevices(Guid, IBugDevices)

Updates the devices associated with a bug.

Declaration
public void AddBugDevices(Guid bugId, IBugDevices bugDevices)
Parameters
Type Name Description
Guid bugId

The id of the bug to update.

IBugDevices bugDevices

The devices associated with the bug.

View Source

AttemptDisposeClientAsync(IGameClient)

Attempts to dispose of a client asynchronously if IAsyncDisposable is implemented. Otherwise disposes synchronously if IDisposable is implemented.

Declaration
public static Task AttemptDisposeClientAsync(IGameClient client)
Parameters
Type Name Description
IGameClient client

The client to dispose of.

Returns
Type Description
Task

A Task that represents the asynchronous operation.

View Source

CleanupGameClientConnections()

Calls the dispose method on all game clients

Declaration
public void CleanupGameClientConnections()
View Source

GetConnectedClientAsync(string, IGameDevice, CancellationToken)

Gets the connected client for the given title and IP address.

Declaration
public Task<IGameClient> GetConnectedClientAsync(string titleName, IGameDevice device, CancellationToken cancellationToken)
Parameters
Type Name Description
string titleName

The game title.

IGameDevice device

The device the game client is connected to.

CancellationToken cancellationToken

Cancellation token.

Returns
Type Description
Task<IGameClient>

A connected game client.

View Source

GetConnectedGameClientsAsync(string, bool, CancellationToken)

Gets the connected game clients for the currently selected devices.

Declaration
public Task<List<IGameClient>> GetConnectedGameClientsAsync(string titleName, bool includeDisconnectedClientsAsNull, CancellationToken cancellationToken)
Parameters
Type Name Description
string titleName

The game title.

bool includeDisconnectedClientsAsNull

Whether to include disconnected clients in the return value as null.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<List<IGameClient>>

A list of game clients.

View Source

GetConnectedGameClientsAsync(string, List<IGameDevice>, bool, CancellationToken)

Gets the connected clients for the given title and IP addresses.

Declaration
public Task<List<IGameClient>> GetConnectedGameClientsAsync(string titleName, List<IGameDevice> devices, bool includeDisconnectedClientsAsNull, CancellationToken cancellationToken)
Parameters
Type Name Description
string titleName

The game title.

List<IGameDevice> devices

The devices the game client is connected to.

bool includeDisconnectedClientsAsNull

Whether to include disconnected clients in the return value as null.

CancellationToken cancellationToken

Cancellation token.

Returns
Type Description
Task<List<IGameClient>>

A list of connected game clients.

View Source

GetConnectedGameClientsAsync(string, Guid, bool, CancellationToken)

Gets the connected game clients for the currently selected devices.

Declaration
public Task<List<IGameClient>> GetConnectedGameClientsAsync(string titleName, Guid bugId, bool includeDisconnectedClientsAsNull, CancellationToken cancellationToken)
Parameters
Type Name Description
string titleName

The game title.

Guid bugId

The id associated with a bug.

bool includeDisconnectedClientsAsNull

Whether to include disconnected clients in the return value as null.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Task<List<IGameClient>>

A list of game clients.

View Source

RegisterGameClientConnection(string, Func<GameClientConnectionContext, CancellationToken, Task<IGameClient>>)

Registers a game client for a title by providing a connection function.

Declaration
public void RegisterGameClientConnection(string titleName, Func<GameClientConnectionContext, CancellationToken, Task<IGameClient>> connectionFunction)
Parameters
Type Name Description
string titleName

The title this client is for.

Func<GameClientConnectionContext, CancellationToken, Task<IGameClient>> connectionFunction

The connection function to create and connect to a game client.

View Source

SubscribeToEvents()

Subscribes to events in order to keep bug data up to date using the stored event aggregator.

Declaration
public void SubscribeToEvents()
View Source

SubscribeToEvents(IEventAggregator)

Subscribes to events in order to keep bug data up to date.

Declaration
public void SubscribeToEvents(IEventAggregator eventAggregator)
Parameters
Type Name Description
IEventAggregator eventAggregator

The event aggregator to use.

View Source

UnregisterGameClientConnectionAsync(string)

Unregister game client connections for the given title.

Declaration
public Task UnregisterGameClientConnectionAsync(string titleName)
Parameters
Type Name Description
string titleName

The title to unregister.

Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

UnsubscribeFromEvents()

Un-subscribes from events using the stored event aggregator.

Declaration
public void UnsubscribeFromEvents()
View Source

UnsubscribeFromEvents(IEventAggregator?)

Un-subscribes from events using the provided event aggregator.

Declaration
public void UnsubscribeFromEvents(IEventAggregator? eventAggregator)
Parameters
Type Name Description
IEventAggregator eventAggregator

The event aggregator to use.

Implements

INotifyPropertyChanged
  • View Source
In this article
Back to top Generated by DocFX