File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,7 @@ export class ExportedData {
14
14
private readonly uri = "exported-data://{exportName}" ;
15
15
private server ?: Server ;
16
16
17
- constructor ( private readonly session : Session ) {
18
- this . session . exportsManager . on ( "export-available" , ( uri : string ) : void => {
19
- this . server ?. sendResourceListChanged ( ) ;
20
- this . server ?. sendResourceUpdated ( uri ) ;
21
- } ) ;
22
- this . session . exportsManager . on ( "export-expired" , ( ) : void => {
23
- this . server ?. sendResourceListChanged ( ) ;
24
- } ) ;
25
- }
17
+ constructor ( private readonly session : Session ) { }
26
18
27
19
public register ( server : Server ) : void {
28
20
this . server = server ;
@@ -44,6 +36,13 @@ export class ExportedData {
44
36
{ description : this . description } ,
45
37
this . readResourceCallback
46
38
) ;
39
+ this . session . exportsManager . on ( "export-available" , ( uri : string ) : void => {
40
+ server . sendResourceListChanged ( ) ;
41
+ server . sendResourceUpdated ( uri ) ;
42
+ } ) ;
43
+ this . session . exportsManager . on ( "export-expired" , ( ) : void => {
44
+ server . sendResourceListChanged ( ) ;
45
+ } ) ;
47
46
}
48
47
49
48
private listResourcesCallback : ListResourcesCallback = ( ) => {
You can’t perform that action at this time.
0 commit comments