Exemple #1
0
 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();
 }
Exemple #2
0
 public SimLinkClient(SimLinkHub simHub) : base("FlightManagerClient")
 {
     Client.OnRecvException            += OnRecvException;
     Client.OnRecvEvent                += OnRecvEvent;
     Client.OnRecvEventObjectAddremove += OnRecvEventObjectAddremove;
     Client.OnRecvSimobjectData        += OnRecvSimobjectData;
     Client.OnRecvSimobjectDataBytype  += OnRecvSimobjectDataBytype;
     this.simHub = simHub;
 }