private void InitSimLink() { // Get a reference to the SignalR SimLinkHub hub = (SimLinkHub)_webHost.Services.GetService(typeof(SimLinkHub)); // Get a reference to the SimLinkClient and initialize client = (SimLinkClient)_webHost.Services.GetService(typeof(SimLinkClient)); client.Initialize(); }
public SimLinkClient(SimLinkHub simHub) : base("FlightManagerClient") { Client.OnRecvException += OnRecvException; Client.OnRecvEvent += OnRecvEvent; Client.OnRecvEventObjectAddremove += OnRecvEventObjectAddremove; Client.OnRecvSimobjectData += OnRecvSimobjectData; Client.OnRecvSimobjectDataBytype += OnRecvSimobjectDataBytype; this.simHub = simHub; }