Ejemplo n.º 1
0
 static async Task HandleConnection(NamedPipeServerStream stream)
 {
     try {
         var handler = new CodeLensConnectionHandler();
         var rpc     = JsonRpc.Attach(stream, handler);
         handler.rpc = rpc;
         await rpc.Completion;
         handler.Dispose();
         stream.Dispose();
     } catch (Exception ex) {
         LogVS(ex);
     }
 }
Ejemplo n.º 2
0
        protected override async Task InitializeAsync(CancellationToken ct, IProgress <ServiceProgressData> progress)
        {
            try {
                await base.InitializeAsync(ct, progress);

                await JoinableTaskFactory.SwitchToMainThreadAsync(ct);

                _ = CodeLensConnectionHandler.AcceptCodeLensConnections();
                await RefreshCommand.Initialize(this, CodeLensConnectionHandler.RefreshCodeLensDataPoint).Caf();
            } catch (Exception ex) {
                LogVS(ex);
                throw;
            }
        }