#pragma warning restore SA1642 // Constructor summary documentation must begin with standard text

        /// <summary>
        /// Sends a single enveloped message to event hub.
        /// </summary>
        /// <param name="envelope">An enveloped message to be sent.</param>
        /// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe while waiting for the task to complete.</param>
        /// <returns>A task representing the asynchronous operation.</returns>
        public Task Send(
            Envelope envelope,
            CancellationToken cancellationToken)
        {
            if (envelope == null)
            {
                throw new ArgumentNullException(nameof(envelope));
            }

            string partitionKey = (envelope.Message as IPartitioned)?.PartitionKey;

            return(_eventSender.Send(new[] { envelope }, partitionKey));
        }