Beispiel #1
0
        private void HandleConnection(NotificationData notifyObject)
        {
            var token = _table.GetOrAdd(notifyObject.Id, _ =>
            {
                var args = new ConnectionArgs(notifyObject);
                OnConnected?.Invoke(this, args);
                return(new InternalTokenized {
                    Data = notifyObject
                });
            });

            token.TimeStamp = DateTime.UtcNow.TimeOfDay;
        }
Beispiel #2
0
 public ConnectionArgs(NotificationData data)
 {
     Info = data ?? throw new ArgumentNullException();
 }
Beispiel #3
0
 public void Register(NotificationData notification)
 {
     _registrator.Register(notification);
 }