Пример #1
0
        public void SendEvent(EventMessage message)
        {
            var eventMessageDto = Mapper.Map<EventMessage, EventMessageDto>(message);

            RedisPersistence.Store(eventMessageDto);
            Clients.All.eventReceived(message);
        }
        public static void Send(EventMessage eventMessage)
        {
            // locking this operation so that it's thread safe
            lock (connectionLock)
            {
                if (!connected)
                {
                    ConnectEventHub();
                }

                if (hubConnection.State == ConnectionState.Connected)
                    proxy.Invoke("SendEvent", eventMessage);
                else
                {
                    ConnectEventHub();
                    proxy.Invoke("SendEvent", eventMessage);
                }
            }
        }
Пример #3
0
 internal void Send(EventMessage eventMessage)
 {
     SignalRProxyConnection.Send(eventMessage);
 }