Show / Hide Table of Contents

Class ClientScopeBase<TKey>

Holds clients and baggage.

Inheritance
object
ClientScopeBase<TKey>
ConnectionScope<TKey, TClient>
GenericClientManager<TKey, TClient>
Implements
ICanConnect<TKey>
IEnumerable<TKey>
IEnumerable
IHoldsBaggage<TKey>
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 ClientScopeBase<TKey> : ICanConnect<TKey>, IEnumerable<TKey>, IEnumerable, IHoldsBaggage<TKey> where TKey : notnull
Type Parameters
Name Description
TKey

The type of key to use.

Methods

View Source

ConnectAsync(IEnumerable<TKey>, CancellationOptions?)

Connects clients to a game instance.

Declaration
public ValueTask ConnectAsync(IEnumerable<TKey> keys, CancellationOptions? co = null)
Parameters
Type Name Description
IEnumerable<TKey> keys

The keys to use to fetch clients and attempt connections.

CancellationOptions? co

The Microsoft.XboxStudios.Bifrost.CancellationOptions.

Returns
Type Description
ValueTask

A Task that represents the asynchronous operation.

View Source

ConnectAsync(TKey, CancellationOptions?)

Connects a client to a game instance.

Declaration
public abstract ValueTask<bool> ConnectAsync(TKey key, CancellationOptions? co = null)
Parameters
Type Name Description
TKey key

The TKey to use to fetch a client and attempt a connection.

CancellationOptions? co

The Microsoft.XboxStudios.Bifrost.CancellationOptions.

Returns
Type Description
ValueTask<bool>

A value indicating whether connection was successful or not.

View Source

GetAllBaggage<TBaggage>()

Gets the baggage of a specified type from all active clients.

Declaration
public virtual IEnumerable<KeyValuePair<TKey, TBaggage>> GetAllBaggage<TBaggage>()
Returns
Type Description
IEnumerable<KeyValuePair<TKey, TBaggage>>

An enumeration of keys and associated baggage.

Type Parameters
Name Description
TBaggage

The type of the baggage.

Exceptions
Type Condition
BaggageNullException

Thrown if the registered baggage factory returned null.

MissingBaggageFactoryException

Thrown if the baggage factory of the requested baggage is not registered.

View Source

GetBaggage<TBaggage>(TKey)

Gets the baggage associated with a key.

Declaration
public abstract TBaggage GetBaggage<TBaggage>(TKey key)
Parameters
Type Name Description
TKey key

The TKey to use to fetch a baggage.

Returns
Type Description
TBaggage

The baggage or null if no connection exists.

Type Parameters
Name Description
TBaggage

The type of the baggage.

Exceptions
Type Condition
BaggageNullException

Thrown if the registered baggage factory returned null.

MissingBaggageFactoryException

Thrown if the baggage factory of the requested baggage is not registered.

View Source

GetEnumerator()

Returns an enumerator that iterates through the collection.

Declaration
public abstract IEnumerator<TKey> GetEnumerator()
Returns
Type Description
IEnumerator<TKey>

An enumerator that can be used to iterate through the collection.

Implements

ICanConnect<TKey>
IEnumerable<T>
IEnumerable
IHoldsBaggage<TKey>
  • View Source
In this article
Back to top Generated by DocFX