Skip to main content

AbstractAltaLifetimeScope

An abstract class in Alta.LifetimeScopes, Alta.ATT.LifetimeScopes.

Base for the game's VContainer lifetime scopes. Subclasses register their bindings in ConfigureScope; debug builds log and profile the setup.

Constructors​

MemberWhat it is
protected AbstractAltaLifetimeScope()Creates an AbstractAltaLifetimeScope with default values.

Fields​

3 private and internal fields
MemberWhat it is
private static readonly Logger loggerClass logger.
private ProfilingSession profileSessionProfiling session for the configure step.
private string typeNameThe scope's type name, used to name the profiling session.

Methods​

MemberWhat it is
void LogStartup()Logs the scope's GameObject name and its parent scope.
protected sealed override void Configure(IContainerBuilder builder)Sealed VContainer hook: makes sure the auto-inject list exists and runs ConfigureScope, with profiling around it.
protected abstract void ConfigureScope(IContainerBuilder builder)Implemented by subclasses to register their bindings.
2 private and internal methods
MemberWhat it is
private void StartProfiling()Debug builds: starts a profiling session and logs startup.
private void StopProfiling()Debug builds: ends the profiling session and logs its report.