Show / Hide Table of Contents

Class NetServerServiceCollectionExtensions

Inheritance
Object
NetServerServiceCollectionExtensions
Namespace: Microsoft.Extensions.DependencyInjection
Assembly: SoCore.dll
Syntax
public static class NetServerServiceCollectionExtensions : Object

Methods

AddDatabaseScoped<TImplementation>(IServiceCollection)

Declaration
public static IServiceCollection AddDatabaseScoped<TImplementation>(this IServiceCollection services)
    where TImplementation : class
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
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
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TService
TImplementation

AddNetServerCore<TSessionMode>(IServiceCollection, Action<NetServerCoreOptionsBuilder>)

Add NetServer core

Declaration
public static IServiceCollection AddNetServerCore<TSessionMode>(this IServiceCollection services, Action<NetServerCoreOptionsBuilder> optionsAction = null)
    where TSessionMode : class, ISoContextProvider
Parameters
Type Name Description
IServiceCollection services
Action<NetServerCoreOptionsBuilder> optionsAction
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TSessionMode

Type of Session handler, like ThreadContextProvider, ProcessContextProvider or

Remarks

This method calls AddLogging(IServiceCollection) to add logging, if it has need been added previously

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 SuperOffice.Factory.ClassFactory as the internal instance resolver.

Declaration
public static IServiceCollection AddSingletonPlugin<TPlugin>(this IServiceCollection services)
    where TPlugin : class, IPlugin
Parameters
Type Name Description
IServiceCollection services
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TPlugin

Type of plugin to explicitly add

Exceptions
Type Condition
SuperOffice.Exceptions.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 SuperOffice.Factory.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
Type Name Description
IServiceCollection services
Func<IServiceProvider, TPlugin> implementationFactory
Returns
Type Description
IServiceCollection
Type Parameters
Name Description
TPlugin

Type of plugin to explicitly add

Exceptions
Type Condition
SuperOffice.Exceptions.SoClassFactoryException

Thrown if the type is not a valid plugin with SuperOffice.Factory.PluginAttribute.IsAutoDiscoverable set to false.

© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top