Interface IEcsHostBuilder
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
buildAction<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
builderAction<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
buildAction<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
buildAction<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
handlerUnhandledExceptionHandlerThe 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
serviceProviderFactoryIServiceProviderFactory<TContainerBuilder>The factory to use to create the service provider.
Returns
- IEcsHostBuilder
The updated host builder.
Type Parameters
TContainerBuilderThe type of the container builder.