MCPcopy Index your code
hub / github.com/dotnet/vscode-csharp / createOptionStream

Function createOptionStream

src/shared/observables/createOptionStream.ts:10–31  ·  view source on GitHub ↗
(vscode: vscode)

Source from the content-addressed store, hash-verified

8import { publishBehavior } from 'rxjs/operators';
9
10export 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}

Callers 2

activateFunction · 0.85

Calls 3

affectsConfigurationMethod · 0.65
disposeMethod · 0.65
createMethod · 0.45

Tested by

no test coverage detected