Class NetServerServiceProviderExtensions
Inherited Members
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: SoCore.dll
Syntax
public static class NetServerServiceProviderExtensions
Methods
RegisterWithNetServer(IServiceProvider, Action<NetServerOptions>)
Register the service provider with NetServer. NetServer Core must be registered in the underlying IOC container using AddNetServerCore<TSessionMode>(IServiceCollection, Action<NetServerCoreOptionsBuilder>)
Declaration
public static IServiceProvider RegisterWithNetServer(this IServiceProvider serviceProvider, Action<NetServerOptions> configureOptions = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider | |
Action<NetServerOptions> | configureOptions |
Returns
Type | Description |
---|---|
IServiceProvider | The instance of the service providcer used by NetServer. |
Exceptions
Type | Condition |
---|---|
TargetInvocationException | Thrown if NetServer core is not added to the IOC container. |