private void ExtractBody(body resp) { if (null != resp) { foreach (var element in resp.Elements <XElement>()) { _manager.Events.NewTag(this, Tag.Get(element)); } } }
private void ConnectionError(ErrorType type, ErrorPolicyType policy, string cause, body body) { if (_disconnecting.IsSet) { return; } if (string.IsNullOrEmpty(body.sid) || Interlocked.Increment(ref _retryCounter) >= MaxRetry) { if (!_connectionError.IsSet) { _connectionError.Set(); _manager.Events.Error(this, type, policy, cause); } } else { foreach (var item in body.Elements()) { _tagQueue.Enqueue(item); } } }