Class NetServerServiceCollectionExtensions
Inheritance
NetServerServiceCollectionExtensions
Assembly: SoCore.dll
Syntax
public static class NetServerServiceCollectionExtensions
Methods
AddDatabaseScoped<TImplementation>(IServiceCollection)
Declaration
public static IServiceCollection AddDatabaseScoped<TImplementation>(this IServiceCollection services) where TImplementation : class
Parameters
Returns
Type Parameters
| Name |
Description |
| TImplementation |
|
AddDatabaseScoped<TService, TImplementation>(IServiceCollection)
Declaration
public static IServiceCollection AddDatabaseScoped<TService, TImplementation>(this IServiceCollection services) where TService : class where TImplementation : class, TService
Parameters
Returns
Type Parameters
| Name |
Description |
| TService |
|
| TImplementation |
|
AddNetServerCoreForAsyncLocalProcess(IServiceCollection, IConfiguration, Action<NetServerCoreOptionsBuilder>)
Declaration
public static IServiceCollection AddNetServerCoreForAsyncLocalProcess(this IServiceCollection services, IConfiguration configuration, Action<NetServerCoreOptionsBuilder> optionsAction = null)
Parameters
Returns
AddNetServerCoreForSingleSessionProcess(IServiceCollection, IConfiguration, Action<NetServerCoreOptionsBuilder>)
Declaration
public static IServiceCollection AddNetServerCoreForSingleSessionProcess(this IServiceCollection services, IConfiguration configuration, Action<NetServerCoreOptionsBuilder> optionsAction = null)
Parameters
Returns
AddNetServerCore<TNSPrincipalAccessor>(IServiceCollection, IConfiguration, Action<NetServerCoreOptionsBuilder>)
Declaration
public static IServiceCollection AddNetServerCore<TNSPrincipalAccessor>(this IServiceCollection services, IConfiguration configuration, Action<NetServerCoreOptionsBuilder> optionsAction = null) where TNSPrincipalAccessor : class, INSPrincipalAccessor
Parameters
Returns
Type Parameters
| Name |
Description |
| TNSPrincipalAccessor |
|
AddSingletonPlugin<TPlugin>(IServiceCollection)
Add a Plugin to the service colelction as a singleton type and also add it explicitly to the SuperOffice.Factory.PluginFactory using ClassFactory as the internal instance resolver.
Declaration
public static IServiceCollection AddSingletonPlugin<TPlugin>(this IServiceCollection services) where TPlugin : class, IPlugin
Parameters
Returns
Type Parameters
| Name |
Description |
| TPlugin |
Type of plugin to explicitly add
|
Exceptions
| Type |
Condition |
| SoClassFactoryException |
Thrown if the type is not a valid plugin with SuperOffice.Factory.PluginAttribute.IsAutoDiscoverable set to false.
|
AddTransientPlugin<TPlugin>(IServiceCollection, Func<IServiceProvider, TPlugin>)
Add a Plugin to the service colelction as a transient type and also add it explicitly to the SuperOffice.Factory.PluginFactory using ClassFactory as the internal instance resolver.
Declaration
public static IServiceCollection AddTransientPlugin<TPlugin>(this IServiceCollection services, Func<IServiceProvider, TPlugin> implementationFactory = null) where TPlugin : class, IPlugin
Parameters
Returns
Type Parameters
| Name |
Description |
| TPlugin |
Type of plugin to explicitly add
|
Exceptions
| Type |
Condition |
| SoClassFactoryException |
Thrown if the type is not a valid plugin with SuperOffice.Factory.PluginAttribute.IsAutoDiscoverable set to false.
|
ValidateNetServerTypes(IServiceCollection)
Checks and validates if the services registered in the service collection are valid for NetServer, such as types registered wiht AddDatabaseScoped.
Declaration
public static IServiceCollection ValidateNetServerTypes(this IServiceCollection serviceCollection)
Parameters
Returns
Exceptions
| Type |
Condition |
| AggregateException |
Thrown if any of the services registered in the service collection are not valid for NetServer.
|