public LinkDeserializationException(byte[] body, LinkMessageProperties properties, LinkRecieveMessageProperties recieveProperties, Exception innerException)
     : base("Cannot deserialize message, see InnerException for details", innerException)
 {
     Body = body;
     Properties = properties;
     RecieveProperties = recieveProperties;
 }
        public void Enqueue(byte[] body, LinkMessageProperties properties, LinkRecieveMessageProperties recieveProperties, LinkMessageOnAckAsyncDelegate onAck,
            LinkMessageOnNackAsyncDelegate onNack)
        {
            if (_disposedCancellation.IsCancellationRequested)
                throw new ObjectDisposedException(GetType().Name);

            var cancellation = _messageCancellation;

            try
            {
                var message = new LinkMessage<byte[]>(body, properties, recieveProperties, onAck, onNack, cancellation);
                var holder = new MessageHolder(message, cancellation);
                _messageQueue.Enqueue(holder, cancellation);
            }
            catch (InvalidOperationException)
            {
                throw new ObjectDisposedException(GetType().Name);
            }
        }