private void WebSocketManagerOnMessageReceived(object sender, SocketMessage socketMessage)
        {
            string resource =
                socketMessage.Message.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)[1];

            var subscription =
                this.externalEventSubscription.Subscribe(new EventSubscriptionMessage(socketMessage.SocketId, resource));

            var seralisedString = this.serialiser.GetString(subscription);
            this.webSocketManager.SendMessage(socketMessage.SocketId, seralisedString);
        }
 void ManagerMessageReceived(object sender, SocketMessage e)
 {
     this._lastSocketMessage = e;
     this._socketSentMessage.Set();
 }
        void WebSocketManagerMessageReceived(object sender, SocketMessage e)
        {
            this.loggingFrameworkAdapter.LogDebug("Websocket message received", e);

            try
            {
                this.decoratedMessageReceivedEvent(sender, e);
            }
            catch (Exception exception)
            {
                this.loggingFrameworkAdapter.LogException(exception);
            }
        }
 void e_MessageReceived(object sender, SocketMessage e)
 {
     if (this.MessageReceived != null)
         this.MessageReceived(this, e);
 }
 private void LoggingWebSocketManagerDecoratorOnMessageReceived(object sender, SocketMessage socketMessage)
 {
     this.messageReceivedEventRaised = true;
 }
 private void ExceptionThrowingMessageReceivedHandler(object sender, SocketMessage socketMessage)
 {
     throw new Exception();
 }
        public void LogSocketMessages()
        {
            SocketMessage message = new SocketMessage(Guid.NewGuid(), "Message");
            this.socketManager.Raise(x => x.MessageReceived += null, this.socketManager, message);

            this.loggingAdapter.Verify(x => x.LogDebug("Websocket message received", message));
        }