* Resolve to an instance of `ContextView` by the binding filter function * for `@inject.view` * @param ctx - Context object * @param injection - Injection information
(ctx: Context, injection: Readonly<Injection>)
| 687 | * @param injection - Injection information |
| 688 | */ |
| 689 | function resolveAsContextView(ctx: Context, injection: Readonly<Injection>) { |
| 690 | assertTargetType(injection, ContextView); |
| 691 | |
| 692 | const bindingFilter = injection.bindingSelector as BindingFilter; |
| 693 | const view = new ContextView( |
| 694 | ctx, |
| 695 | bindingFilter, |
| 696 | injection.metadata.bindingComparator, |
| 697 | ); |
| 698 | view.open(); |
| 699 | return view; |
| 700 | } |
| 701 | |
| 702 | /** |
| 703 | * Return a map of injection objects for properties |
nothing calls this directly
no test coverage detected