Table of Contents

Class ServiceCollectionSystemExtensions

Namespace
SampSharp.Entities
Assembly
SampSharp.OpenMp.Entities.dll

Extension methods for adding systems to an IServiceCollection.

public static class ServiceCollectionSystemExtensions
Inheritance
ServiceCollectionSystemExtensions
Inherited Members

Methods

AddSystem(IServiceCollection, Type)

Adds the system of the specified type as a singleton and enables the system in the system registry.

public static IServiceCollection AddSystem(this IServiceCollection services, Type type)

Parameters

services IServiceCollection

The service collection to add the system to.

type Type

The type of the system to add.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

AddSystem<T>(IServiceCollection)

Adds the system of the specified type T as a singleton and enables the system in the system registry.

public static IServiceCollection AddSystem<T>(this IServiceCollection services) where T : class, ISystem

Parameters

services IServiceCollection

The service collection to add the system to.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

Type Parameters

T

The type of the system to add.

AddSystemsInAssembly(IServiceCollection)

Adds the all types which implement ISystem in the calling assembly as singletons and enable the systems in the system registry.

public static IServiceCollection AddSystemsInAssembly(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection to add the systems to.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

AddSystemsInAssembly(IServiceCollection, Assembly)

Adds the all types which implement ISystem in the specified assembly as singletons and enable the systems in the system registry.

public static IServiceCollection AddSystemsInAssembly(this IServiceCollection services, Assembly assembly)

Parameters

services IServiceCollection

The service collection to add the systems to.

assembly Assembly

The assembly of which to add its types as systems.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

AddSystemsInAssembly<TTypeInAssembly>(IServiceCollection)

Adds the all types which implement ISystem in the assembly of the specified type TTypeInAssembly as singletons and enable the systems in the system registry.

public static IServiceCollection AddSystemsInAssembly<TTypeInAssembly>(this IServiceCollection services)

Parameters

services IServiceCollection

The service collection to add the systems to.

Returns

IServiceCollection

A reference to this instance after the operation has completed.

Type Parameters

TTypeInAssembly

A type in the assembly of which to add its types as system.