(vscode: vscode)
| 8 | import { publishBehavior } from 'rxjs/operators'; |
| 9 | |
| 10 | export default function createOptionStream(vscode: vscode): Observable<void> { |
| 11 | return Observable.create((observer: Observer<void>) => { |
| 12 | const disposable = vscode.workspace.onDidChangeConfiguration((e) => { |
| 13 | //if the omnisharp or csharp configuration are affected only then read the options |
| 14 | if ( |
| 15 | e.affectsConfiguration('dotnet') || |
| 16 | e.affectsConfiguration('omnisharp') || |
| 17 | e.affectsConfiguration('csharp') |
| 18 | ) { |
| 19 | observer.next(); |
| 20 | } |
| 21 | }); |
| 22 | |
| 23 | return () => disposable.dispose(); |
| 24 | }) |
| 25 | .pipe( |
| 26 | publishBehavior(() => { |
| 27 | return; |
| 28 | }) |
| 29 | ) |
| 30 | .refCount(); |
| 31 | } |
no test coverage detected