public PlayerServiceWebClient(SignalRConnection signalR) { SignalR = signalR; SignalR.HubConnection.On <IImmutableList <PlayerState> >("PlayerlistChanged", newValue => { OnPlayerlistChanged?.Invoke(this, newValue); }); SignalR.HubConnection.On <PlayerInfo?>("MyInfoChanged", newValue => { OnMyInfoChanged?.Invoke(this, newValue); }); SignalR.HubConnection.On <int>("TokenStockChanged", newValue => { OnTokenStockChanged?.Invoke(this, newValue); }); HubConnection.On <ChangeSet>("BoardChanged", changes => { OnBoardChanged?.Invoke(this, changes); }); HubConnection.On <int>("CountdownChanged", countDown => { OnCountdownChanged?.Invoke(this, countDown); }); }
private void OnGlobalPlayerlistChanged(object sender, IImmutableList <PlayerState> newPlayerlist) { OnPlayerlistChanged?.Invoke(this, newPlayerlist); }