Example #1
0
 // Also handles (un)subscription to make switching between this and WS easier.
 public void callHandler(string data, object callback)
 {
     Task.Run(() => {
         var result = dispatcher.ProcessHandlerMessage(this, data);
         if (callback != null)
         {
             Renderer.ExecuteCallback(callback, result?.ToString(Formatting.None));
         }
     });
 }
Example #2
0
        // Also handles (un)subscription to make switching between this and WS easier.
        public void callHandler(string data, object callback)
        {
            // Tell the overlay that the page is using the modern API.
            receiver.InitModernAPI();

            Task.Run(() => {
                var result = dispatcher.ProcessHandlerMessage(receiver, data);
                if (callback != null)
                {
                    Renderer.ExecuteCallback(callback, result?.ToString(Newtonsoft.Json.Formatting.None));
                }
            });
        }