Handling Hub proxy callbacks
Let's turn our attention to the SignalRClient
; we created an EventHandler
, which fires every time data is received from the Hub. The BasePresenter
will be responsible for handling the data received from this EventHandler
:
#region Constructors public BasePresenter() { _webApiAccess = new WebApiAccess(); _signalREvents = new Dictionary<string, Action<string>>() { {"clients", (data) => { var list = JsonConvert.DeserializeObject<IEnumerable<string>>(data); if (ConnectedClientsUpdated != null) { ConnectedClientsUpdated(this, new ConnectedClientsUpdatedEventArgs(list.Select(x => new Client { Username = x,&...