AppContext
Application context is a way, to resolve components dependencies. Each component should provide an AppContextProvider, and AppContext[Component] will instantiate this components with dependencies.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
AppContext.type
Members list
Type members
Types
Type for component cache. By convention, if component depends from cache then it's AppContextProvider should check if this component is already in cache and instantiate new (and update cache) only if it's not found.
Type for component cache. By convention, if component depends from cache then it's AppContextProvider should check if this component is already in cache and instantiate new (and update cache) only if it's not found.
Attributes
Type for cache key. By convention, usually this is a type.show.
Type for cache key. By convention, usually this is a type.show.
Attributes
Value members
Concrete methods
Get component from application context. For this component should have an implicit AppContextProvider.
Get component from application context. For this component should have an implicit AppContextProvider.
Type parameters
- T
-
- component to instantiate
Attributes
- See also
-
AppContextProvider
Extensions
Extensions
Get component from cache.
Get component from cache.
Type parameters
- T
-
- component type
Attributes
- Returns
-
Some(component) or None if component is not found.
Get component from cache or create new one and update cache.
Get component from cache or create new one and update cache.
Type parameters
- T
-
- component type
Value parameters
- value
-
- function to create new component
Attributes
- Returns
-
just created or cached component
Modify component in cache.
Modify component in cache.
Type parameters
- T
-
- component type
Value parameters
- f
-
- function to remap
Attributes
Put component to cache, replacing old if needed
Put component to cache, replacing old if needed
Attributes
Remove component from cache.
Remove component from cache.
Type parameters
- T
-
- component type