File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/client/pythonEnvironments/base Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright (c) Microsoft Corporation. All rights reserved.
2
+ // Licensed under the MIT License.
3
+
4
+ import { Event } from 'vscode' ;
5
+ import { IPythonEnvsWatcher , PythonEnvsChangedEvent , PythonEnvsWatcher } from './watcher' ;
6
+
7
+ /**
8
+ * A wrapper around a set of watchers.
9
+ *
10
+ * If any of the wrapped watchers emits an event then this wrapper
11
+ * emits that event.
12
+ */
13
+ export class PythonEnvsWatchers {
14
+ public readonly onChanged : Event < PythonEnvsChangedEvent > ;
15
+ private watcher = new PythonEnvsWatcher ( ) ;
16
+
17
+ constructor ( watchers : ReadonlyArray < IPythonEnvsWatcher > ) {
18
+ this . onChanged = this . watcher . onChanged ;
19
+ watchers . forEach ( ( w ) => {
20
+ w . onChanged ( ( e ) => this . watcher . fire ( e ) ) ;
21
+ } ) ;
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments