ServiceLocator Class |
Namespace: Archon.SwissArmyLib.Utils
The ServiceLocator type exposes the following members.
Name | Description | |
---|---|---|
IsRegisteredT |
Checks whether there's registered a resolver for a specific type.
| |
IsRegisteredInSceneT |
Checks whether there's registered a scene-specific resolver for a specific type in the currently active scene.
| |
IsRegisteredInSceneT(Scene) |
Checks whether there's registered a scene-specific resolver for a specific type in the specified scene.
| |
RegisterLazySingletonT |
Registers a concrete singleton of the given type.
The instance won't be created until the first time it is resolved.
| |
RegisterLazySingletonTAbstract, TConcrete |
Registers a concrete singleton of the type TConcrete for the abstract type
TAbstract.
The instance won't be created until the first time it is resolved.
| |
RegisterLazySingletonForSceneT |
Registers a scene-specific concrete singleton of the given type.
The instance won't be created until the first time it is resolved.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterLazySingletonForSceneT(Scene) |
Registers a scene-specific concrete singleton of the given type.
The instance won't be created until the first time it is resolved.
| |
RegisterLazySingletonForSceneTAbstract, TConcrete |
Registers a scene-specific concrete singleton of the type TConcrete for the abstract type
TAbstract.
The instance won't be created until the first time it is resolved.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterLazySingletonForSceneTAbstract, TConcrete(Scene) |
Registers a scene-specific concrete singleton of the type TConcrete for the abstract type
TAbstract.
The instance won't be created until the first time it is resolved.
| |
RegisterSingletonT |
Registers a concrete singleton of the given type.
| |
RegisterSingletonT(T) |
Registers a specific instance to be a singleton for its concrete type.
| |
RegisterSingletonTAbstract, TConcrete |
Registers a concrete singleton of the type TConcrete for the abstract type
TAbstract.
| |
RegisterSingletonTAbstract, TConcrete(TConcrete) |
Registers a specific instance to be a singleton for the abstract type.
| |
RegisterSingletonForSceneT |
Registers a scene-specific concrete singleton of the given type.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterSingletonForSceneT(T) |
Registers a specific instance to be a scene-specific singleton for its concrete type.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterSingletonForSceneT(Scene) |
Registers a scene-specific concrete singleton of the given type.
| |
RegisterSingletonForSceneT(T, Scene) |
Registers a specific instance to be a scene-specific singleton for its concrete type.
| |
RegisterSingletonForSceneTAbstract, TConcrete |
Registers a scene-specific concrete singleton of the type TConcrete for the abstract type
TAbstract.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterSingletonForSceneTAbstract, TConcrete(TConcrete) |
Registers a specific instance to be a scene-specific singleton for the abstract type.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterSingletonForSceneTAbstract, TConcrete(Scene) |
Registers a scene-specific concrete singleton of the type TConcrete for the abstract type
TAbstract.
| |
RegisterSingletonForSceneTAbstract, TConcrete(TConcrete, Scene) |
Registers a specific instance to be a scene-specific singleton for the abstract type.
| |
RegisterTransientT |
Registers a concrete transient type.
A new instance of the given type will be returned each time it is resolved.
| |
RegisterTransientT(FuncT) |
Registers a concrete transient type to return new instances of when T is resolved.
The specified resolver will be used for producing the instances.
| |
RegisterTransientTAbstract, TConcrete |
Registers a concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
| |
RegisterTransientTAbstract, TConcrete(FuncTConcrete) |
Registers a concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
The specified resolver will be used for producing the instances.
| |
RegisterTransientForSceneT |
Registers scene-specific a concrete transient type.
A new instance of the given type will be returned each time it is resolved.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterTransientForSceneT(FuncT) |
Registers a scene-specific concrete transient type to return new instances of when T is
resolved.
The specified resolver will be used for producing the instances.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterTransientForSceneT(Scene) |
Registers scene-specific a concrete transient type.
A new instance of the given type will be returned each time it is resolved.
| |
RegisterTransientForSceneT(FuncT, Scene) |
Registers a scene-specific concrete transient type to return new instances of when T is
resolved.
The specified resolver will be used for producing the instances.
| |
RegisterTransientForSceneTAbstract, TConcrete |
Registers a scene-specific concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterTransientForSceneTAbstract, TConcrete(FuncTConcrete) |
Registers a scene-specific concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
The specified resolver will be used for producing the instances.
Remarks The resolver is registered for the active scene according to GetActiveScene. | |
RegisterTransientForSceneTAbstract, TConcrete(Scene) |
Registers a scene-specific concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
| |
RegisterTransientForSceneTAbstract, TConcrete(FuncTConcrete, Scene) |
Registers a scene-specific concrete transient type to return new instances of when the abstract type
TAbstract is resolved.
The specified resolver will be used for producing the instances.
| |
Reset |
Clears all resolvers.
| |
ResetGlobal |
Clears global resolvers.
| |
ResetScene |
Clears the currently active scene's resolvers.
| |
ResetScene(Scene) |
Clears a specific scene's resolvers.
| |
ResetScenes |
Clears all scene specific resolvers for all scenes.
| |
ResolveT |
Locates and returns a transient object or singleton of the specified type.
Searches for a global object first, if nothing is found and includeActiveScene is true then it
searches for a scene specific resolver.
Make sure the type is registered first.
| |
ResolveForSceneT |
Locates and returns a transient object or singleton of the specified type for the currently active scene.
Make sure the type is registered first.
| |
ResolveForSceneT(Scene) |
Locates and returns a transient object or singleton of the specified type for the given scene.
Make sure the type is registered first.
|
Name | Description | |
---|---|---|
GlobalReset |
Called when the global resolvers are reset.
| |
SceneReset |
Called when a scene's resolvers are reset.
|