Esempio n. 1
0
        public async Task Audit(AuditItem auditItem, CancellationToken cancellationToken)
        {
            string messageText  = _serializer.Serialize(auditItem);
            string partitionKey = _partitionKeyProvider.GetPartitionKey(auditItem);

            if (string.IsNullOrWhiteSpace(partitionKey))
            {
                await _client.SendAsync(messageText);
            }
            else
            {
                await _client.SendAsync(messageText, partitionKey);
            }
        }
        public Task SendAsync <T>(T payload)
        {
            string serializedContent = _serializer.Serialize(payload);

            return(SendAsync(serializedContent));
        }