Ejemplo n.º 1
0
 public DelegatingHandler(
     Func <DidChangeWatchedFilesParams, CancellationToken, Task <Unit> > handler,
     Action <DidChangeWatchedFilesCapability> setCapability,
     DidChangeWatchedFilesRegistrationOptions registrationOptions) : base(registrationOptions)
 {
     _handler       = handler;
     _setCapability = setCapability;
 }
Ejemplo n.º 2
0
 public static IDisposable OnDidChangeWatchedFiles(
     this ILanguageServerRegistry registry,
     Func <DidChangeWatchedFilesParams, CancellationToken, Task <Unit> > handler,
     Action <DidChangeWatchedFilesCapability> setCapability       = null,
     DidChangeWatchedFilesRegistrationOptions registrationOptions = null)
 {
     registrationOptions ??= new DidChangeWatchedFilesRegistrationOptions();
     return(registry.AddHandlers(new DelegatingHandler(handler, setCapability, registrationOptions)));
 }
Ejemplo n.º 3
0
 public DidChangeWatchedFilesHandler(DidChangeWatchedFilesRegistrationOptions registrationOptions) => _options = registrationOptions;
Ejemplo n.º 4
0
 private void WatchedFilesRegistered(object sender, DidChangeWatchedFilesRegistrationOptions e)
 {
     // Add the file globs to our listener. It will listen to the globs
     _fileListener?.AddPatterns(e.Watchers);
 }