(
extensionPointName?: string,
metadata?: InjectionMetadata,
)
| 125 | * @param metadata - Optional injection metadata |
| 126 | */ |
| 127 | export function view( |
| 128 | extensionPointName?: string, |
| 129 | metadata?: InjectionMetadata, |
| 130 | ) { |
| 131 | return inject( |
| 132 | '', |
| 133 | {...metadata, decorator: '@extensions.view'}, |
| 134 | (ctx, injection, session) => { |
| 135 | assertTargetType(injection, ContextView); |
| 136 | const bindingFilter = filterByExtensionPoint( |
| 137 | injection, |
| 138 | session, |
| 139 | extensionPointName, |
| 140 | ); |
| 141 | return ctx.createView( |
| 142 | bindingFilter, |
| 143 | injection.metadata.bindingComparator, |
| 144 | metadata, |
| 145 | ); |
| 146 | }, |
| 147 | ); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Inject an array of resolved extension instances for the extension point. |
nothing calls this directly
no test coverage detected