private void WebSocketMessageReceived(object sender, StringEventArgs e)
        {
            Message ms = JsonUtilities.DeserializeLogyardMessage(e.Data);

            if (!string.IsNullOrEmpty(ms.Error))
            {
                if (this.ErrorReceived != null)
                {
                    var error = new LogyardException(ms.Error);
                    this.ErrorReceived(this, new ErrorEventArgs()
                    {
                        Error = error
                    });
                }
            }
            else
            {
                if (this.MessageReceived != null)
                {
                    MessageEventArgs args = new MessageEventArgs()
                    {
                        Message = ms
                    };
                    this.MessageReceived(this, args);
                }
            }
        }
 private void WebSocketMessageReceived(object sender, StringEventArgs e)
 {
     Message ms = JsonUtilities.DeserializeLogyardMessage(e.Data);
     if (!string.IsNullOrEmpty(ms.Error))
     {
         if (this.ErrorReceived != null)
         {
             var error = new LogyardException(ms.Error);
             this.ErrorReceived(this, new ErrorEventArgs() { Error = error });
         }
     }
     else
     {
         if (this.MessageReceived != null)
         {
             MessageEventArgs args = new MessageEventArgs() { Message = ms };
             this.MessageReceived(this, args);
         }
     }
 }