private void storeEvent(Session session, BaseClientEvent clientEvent) { clientEvent.Id = _nextEventId++; var events = _eventsBySessionId.GetOrAdd(session.Id, k => new List<BaseClientEvent>()); lock (events) { events.Add(clientEvent); } }
private void setBaseEventDetails(BaseClientEvent baseEvent, BaseCommand baseCommand) { // TODO: get client details from the hub context (dont have them in the command?) baseEvent.Sender = baseCommand.Sender; baseEvent.TimeStamp = baseCommand.TimeStamp; }