/// <inheritdoc />
        public async Task <string> EnqueueAsync(T message, CancellationToken cancellationToken)
        {
            await _blobContainer.CreateIfNotExistsAsync(cancellationToken);

            string            blobName = BlobNames.GetConflictFreeDateTimeBasedBlobName();
            IStorageBlockBlob blob     = _blobContainer.GetBlockBlobReference(blobName);

            message.AddMetadata(blob.Metadata);
            string messageBody = JsonConvert.SerializeObject(message, JsonSerialization.Settings);
            await blob.UploadTextAsync(messageBody, cancellationToken : cancellationToken);

            return(blobName);
        }
        public void Write(IndexerLogEntry entry)
        {
            if (entry == null)
            {
                return;
            }

            string logBlobName = BlobNames.GetConflictFreeDateTimeBasedBlobName(entry.Date);

            entry.Id = logBlobName;

            string logEntryAsJson = JsonConvert.SerializeObject(entry, JsonSerialization.Settings);

            _logsContainer.CreateIfNotExists();

            CloudBlockBlob logBlob = _logsContainer.GetBlockBlobReference(_containerDirectory + "/" + logBlobName);

            logBlob.Metadata[BlobLogEntryKeys.TitleKey] = entry.Title;
            logBlob.Metadata[BlobLogEntryKeys.LogDate]  = entry.Date.ToString(CultureInfo.InvariantCulture);

            logBlob.UploadText(logEntryAsJson);
        }