Home > @loopback/context > ResolutionSession
ResolutionSession class
Object to keep states for a session to resolve bindings and their dependencies within a context
Signature:
export declare class ResolutionSession
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
|
|
Readonly<Binding>[] |
Getter for bindings on the stack | |
|
|
Readonly<Binding> | undefined |
Getter for the current binding | |
|
|
Readonly<Injection> | undefined |
Getter for the current injection | |
|
|
Readonly<Injection>[] |
Getter for injections on the stack | |
|
|
A stack of bindings for the current resolution session. It’s used to track the path of dependency resolution and detect circular dependencies. |
Methods
| Method | Modifiers | Description |
|---|---|---|
|
|
Describe the injection for debugging purpose | |
|
|
Fork the current session so that a new one with the same stack can be used in parallel or future resolutions, such as multiple method arguments, multiple properties, or a getter function | |
|
Get the binding path as | ||
|
Get the injection path as | ||
|
Get the resolution path including bindings and injections, for example: | ||
|
Exit the resolution of a binding | ||
|
Pop the last injection | ||
|
Enter the resolution of the given binding. If | ||
|
Push the injection onto the session | ||
|
|
Run the given action with the given binding and session | |
|
|
Run the given action with the given injection and session | |