private void InitIpc() { try { IpcProvider = this.pluginInterface.GetIpcProvider <object, object>("PingPlugin.Ipc"); this.pingTracker.OnPingUpdated += payload => { dynamic obj = new ExpandoObject(); obj.LastRTT = payload.LastRTT; obj.AverageRTT = payload.AverageRTT; IpcProvider.SendMessage(obj); }; } catch (Exception e) { PluginLog.Error($"Error registering IPC provider:\n{e}"); } }
private void OnTooltip(object?item) { var(type, id) = ChangedItemExtensions.ChangedItemToTypeAndId(item); ProviderChangedItemTooltip?.SendMessage(type, id); }
private void OnClick(MouseButton click, object?item) { var(type, id) = ChangedItemExtensions.ChangedItemToTypeAndId(item); ProviderChangedItemClick?.SendMessage(click, type, id); }