Class BifrostFactory<TClient, TMessage>
Creates a Bifrost client given BifrostOptions.
Implements
IClientFactory<TClient, BifrostOptions>
Inherited Members
Namespace: Microsoft.XboxStudios.ClientManager.Bifrost
Assembly: ClientManager.Bifrost.Abstractions.dll
Syntax
public class BifrostFactory<TClient, TMessage> : IClientFactory<TClient, BifrostOptions> where TMessage : class
Type Parameters
Name | Description |
---|---|
TClient | The type of the client to create. |
TMessage | The type of the message the client uses to communicate with Microsoft.XboxStudios.Bifrost.Serializer.ISerializer<TMessage>. |
Remarks
Initializes a new instance of the BifrostFactory<TClient, TMessage> class.
Constructors
View SourceBifrostFactory(IServiceProvider)
Creates a Bifrost client given BifrostOptions.
Declaration
public BifrostFactory(IServiceProvider services)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | services | The service provider containing Bifrost serializer and client services. |
Remarks
Initializes a new instance of the BifrostFactory<TClient, TMessage> class.
Methods
View SourceCreate(BifrostOptions, IDevice)
Creates a client with specified options.
Declaration
public TClient Create(BifrostOptions options, IDevice device)
Parameters
Type | Name | Description |
---|---|---|
BifrostOptions | options | The options to use. |
IDevice | device | The device to create a client for. |
Returns
Type | Description |
---|---|
TClient | The client. |