Exemplo n.º 1
0
 // Called on the VsLinkServer thread - should not block
 public static void VsLinkMessageHandler(VsLinkMessage message)
 {
     var registerXllMessage = message as RegisterAddInMessage;
     if (registerXllMessage != null)
     {
         if (registerXllMessage.AddInPath.EndsWith(".xll"))
         {
             ExcelAsyncUtil.QueueAsMacro(() => ExcelIntegration.RegisterXLL(registerXllMessage.AddInPath));
         }
         else if (registerXllMessage.AddInPath.EndsWith(".dll"))
         {
             ExcelAsyncUtil.QueueAsMacro(() => AddInLoader.RegisterDll(registerXllMessage.AddInPath));
         }
     }
 }
Exemplo n.º 2
0
 public Task SendMessageAsync(VsLinkMessage message)
 {
     byte[] messageBytes = message.ToBytes();
     return PipeStream.WriteAsync(messageBytes, 0, messageBytes.Length);
 }