Пример #1
0
 private void ConnectionMessageReceivedEventHandler(object sender, TextMessageHandledEventArgs e)
 {
     this.OnMessageReceived(e);
 }
Пример #2
0
        private void ConnectionMessageReceivedEventHandler(object sender, TextMessageHandledEventArgs e)
        {
            if (this.commandQueue.Count == 0)
            {
                return;
            }

            SafariResponseMessage response = SafariResponseMessage.FromJson(e.Message);
            if (this.commandQueue.Peek().Id != response.Id)
            {
                throw new WebDriverException("Unmatched command/response ID pair");
            }

            this.commandQueue.Dequeue();

            lock (this.responseQueue)
            {
                this.responseQueue.Enqueue(response);
            }
        }
Пример #3
0
 private void Handler_TextMessageHandled(object sender, TextMessageHandledEventArgs e)
 {
     this.OnMessageReceived(e);
 }
Пример #4
0
 /// <summary>
 /// Fires the MessageReceived event.
 /// </summary>
 /// <param name="e">A <see cref="TextMessageHandledEventArgs"/> that contains the event data.</param>
 protected void OnMessageReceived(TextMessageHandledEventArgs e)
 {
     if (this.MessageReceived != null)
     {
         this.MessageReceived(this, e);
     }
 }
 private void Handler_TextMessageHandled(object sender, TextMessageHandledEventArgs e)
 {
     this.OnMessageReceived(e);
 }
Пример #6
0
 private void ConnectionMessageReceivedEventHandler(object sender, TextMessageHandledEventArgs e)
 {
     this.OnMessageReceived(e);
 }