Table of Contents

Interface IEcsHostBuilder

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

Defines methods for configuring the Entity Component System (ECS) framework, including systems, services, logging, exception handling, and service provider factories.

public interface IEcsHostBuilder

Methods

Configure(Action<IEcsBuilder>)

Configures the ECS framework itself, allowing for configuration of systems, components, and other ECS-related features.

IEcsHostBuilder Configure(Action<IEcsBuilder> build)

Parameters

build Action<IEcsBuilder>

A delegate that configures the ECS builder.

Returns

IEcsHostBuilder

The updated host builder.

ConfigureLogging(Action<ILoggingBuilder>)

Configures the logging used by the application.

IEcsHostBuilder ConfigureLogging(Action<ILoggingBuilder> builder)

Parameters

builder Action<ILoggingBuilder>

A delegate that configures the logging builder.

Returns

IEcsHostBuilder

The updated host builder.

ConfigureServices(Action<IServiceCollection>)

Configures the services used by the application.

IEcsHostBuilder ConfigureServices(Action<IServiceCollection> build)

Parameters

build Action<IServiceCollection>

A delegate that configures the service collection.

Returns

IEcsHostBuilder

The updated host builder.

ConfigureServices(Action<SampSharpEnvironment, IServiceCollection>)

Configures the services used by the application.

IEcsHostBuilder ConfigureServices(Action<SampSharpEnvironment, IServiceCollection> build)

Parameters

build Action<SampSharpEnvironment, IServiceCollection>

A delegate that configures the service collection.

Returns

IEcsHostBuilder

The updated host builder.

ConfigureUnhandledExceptionhandler(UnhandledExceptionHandler)

Configures the unhandled exception handler used by the application.

IEcsHostBuilder ConfigureUnhandledExceptionhandler(UnhandledExceptionHandler handler)

Parameters

handler UnhandledExceptionHandler

The handler for unhandled exceptions during the execution of the application.

Returns

IEcsHostBuilder

The updated host builder.

DisableDefaultSystemsLoading()

Prevents the framework from automatically loading systems from the entry assembly. This is useful if you want to manually control which systems are loaded.

IEcsHostBuilder DisableDefaultSystemsLoading()

Returns

IEcsHostBuilder

The updated host builder.

UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder>)

Configures the service provider factory used by the application.

IEcsHostBuilder UseServiceProviderFactory<TContainerBuilder>(IServiceProviderFactory<TContainerBuilder> serviceProviderFactory) where TContainerBuilder : notnull

Parameters

serviceProviderFactory IServiceProviderFactory<TContainerBuilder>

The factory to use to create the service provider.

Returns

IEcsHostBuilder

The updated host builder.

Type Parameters

TContainerBuilder

The type of the container builder.