Show / Hide Table of Contents

Class PhoenixClientManager<TClient>

A client manager for Phoenix.

Inheritance
object
ClientScopeBase<IDevice>
GenericClientManager<IDevice, TClient>
PhoenixClientManager<TClient>
Implements
ICanConnect<IDevice>
IEnumerable<IDevice>
IEnumerable
IDisposable
IPhoenixClientManager<TClient>
IClientManager<IDevice, TClient>
IClientManager<IDevice>
ICanDisconnect<IDevice>
IHoldsBaggage<IDevice>
Inherited Members
GenericClientManager<IDevice, TClient>.OnConnectionChanged
GenericClientManager<IDevice, TClient>.OnConnecting
GenericClientManager<IDevice, TClient>.OnConnected
GenericClientManager<IDevice, TClient>.OnDisconnecting
GenericClientManager<IDevice, TClient>.OnDisconnected
GenericClientManager<IDevice, TClient>.DisconnectAsync(IEnumerable<IDevice>)
GenericClientManager<IDevice, TClient>.Disconnect(IEnumerable<IDevice>)
GenericClientManager<IDevice, TClient>.Reserve(IDevice)
GenericClientManager<IDevice, TClient>.ReserveAndConnectAsync(IDevice, CancellationOptions?)
GenericClientManager<IDevice, TClient>.ConnectAsync(IDevice, CancellationOptions?)
GenericClientManager<IDevice, TClient>.NeedsToConnect(TClient)
GenericClientManager<IDevice, TClient>.DisconnectAsync(IDevice)
GenericClientManager<IDevice, TClient>.Disconnect(IDevice)
GenericClientManager<IDevice, TClient>.GetEnumerator()
GenericClientManager<IDevice, TClient>.GetBaggage<TBaggage>(IDevice)
GenericClientManager<IDevice, TClient>.CreateScope()
GenericClientManager<IDevice, TClient>.Dispose()
GenericClientManager<IDevice, TClient>.ConnectionChanged((IDevice Key, TClient Client))
GenericClientManager<IDevice, TClient>.GetBaggageFactory<T>()
GenericClientManager<IDevice, TClient>.TryGetClientAndBaggage(IDevice, out (ISharedRef<TClient, Reserved<TClient>> Connection, ConcurrentDictionary<Type, object> Baggage))
GenericClientManager<IDevice, TClient>.ExistingClientFor(IDevice)
GenericClientManager<IDevice, TClient>.ClientFor(IDevice)
GenericClientManager<IDevice, TClient>.ClientAndBaggageFor(IDevice)
ClientScopeBase<IDevice>.ConnectAsync(IEnumerable<IDevice>, CancellationOptions?)
ClientScopeBase<IDevice>.ConnectAsync(IDevice, CancellationOptions?)
ClientScopeBase<IDevice>.GetAllBaggage<TBaggage>()
ClientScopeBase<IDevice>.GetBaggage<TBaggage>(IDevice)
ClientScopeBase<IDevice>.GetEnumerator()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.ClientManager
Assembly: Phoenix.ClientManager.dll
Syntax
public class PhoenixClientManager<TClient> : GenericClientManager<IDevice, TClient>, ICanConnect<IDevice>, IEnumerable<IDevice>, IEnumerable, IDisposable, IPhoenixClientManager<TClient>, IClientManager<IDevice, TClient>, IClientManager<IDevice>, ICanDisconnect<IDevice>, IHoldsBaggage<IDevice> where TClient : class, IGameConnect, IEquatable<TClient?>
Type Parameters
Name Description
TClient

The type of the client used to connect to a game instance.

Constructors

View Source

PhoenixClientManager(IPhoenixClientManagerAdapter<TClient>, EventSubscriber, IDeviceManager?, IEnumerable<IBaggageFactory<TClient>>?)

Initializes a new instance of the PhoenixClientManager<TClient> class.

Declaration
public PhoenixClientManager(IPhoenixClientManagerAdapter<TClient> adapter, EventSubscriber eventSubscriber, IDeviceManager? deviceManager = null, IEnumerable<IBaggageFactory<TClient>>? baggageFactories = null)
Parameters
Type Name Description
IPhoenixClientManagerAdapter<TClient> adapter

The adapter.

EventSubscriber eventSubscriber

The event subscriber used to subscribe to device related events.

IDeviceManager deviceManager

The Phoenix device manager.

IEnumerable<IBaggageFactory<TClient>> baggageFactories

An enumeration of factories to create baggages and attach them to clients.

Properties

View Source

ConnectionStatus

Gets the Phoenix.Controls.GameConnection.GameConnectionStatus of the client on the current device.

Declaration
public GameConnectionStatus ConnectionStatus { get; }
Property Value
Type Description
GameConnectionStatus
View Source

Current

Gets the active client that is associated with the current device.

Declaration
public TClient? Current { get; }
Property Value
Type Description
TClient
View Source

CurrentDevice

Gets the current device selected by user. Null if no device is selected.

Declaration
public IDevice? CurrentDevice { get; }
Property Value
Type Description
IDevice
View Source

IsConnected

Gets a value indicating whether a client is connected to the current device or not.

Declaration
public bool IsConnected { get; }
Property Value
Type Description
bool

Methods

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public override void Dispose()
Overrides
Microsoft.XboxStudios.ClientManager.GenericClientManager<Microsoft.XboxStudios.DeviceConsole.IDevice, TClient>.Dispose()
View Source

OnDeviceSelected(DeviceCollectionChangeInfo)

Handles device select event.

Declaration
protected virtual void OnDeviceSelected(DeviceCollectionChangeInfo e)
Parameters
Type Name Description
DeviceCollectionChangeInfo e

The event arguments.

Remarks

There is one known bug: If a user has multiple devices selected and unselects the client device, the current device will be set to null. This can be fixed by using IDeviceManager to fall back to any selected device.

View Source

OptionsFor(IDevice)

Gets the connection options for a specific device.

Declaration
public object OptionsFor(IDevice device)
Parameters
Type Name Description
IDevice device

The device to get the options for.

Returns
Type Description
object

The connection options.

View Source

SetOptionsFor(IDevice, object)

Sets the options for a given device.

Declaration
public void SetOptionsFor(IDevice device, object options)
Parameters
Type Name Description
IDevice device

The device to set options for.

object options

The options to set.

Events

View Source

OnCurrentClientChanged

Event triggered when the current active client changes.

Declaration
public event EventHandler? OnCurrentClientChanged
Event Type
Type Description
EventHandler

Implements

ICanConnect<TKey>
IEnumerable<T>
IEnumerable
IDisposable
IPhoenixClientManager<TClient>
IClientManager<TKey, TClient>
IClientManager<TKey>
ICanDisconnect<TKey>
IHoldsBaggage<TKey>
  • View Source
In this article
Back to top Generated by DocFX