public async Task Add(IEvent @event) { var json = JsonConvert.SerializeObject(@event, Formatting.Indented); var item = new EventItem { EventType = @event.GetType().Name, Data = json, SourceCommandId = @event.SourceCommandId }; var storageAccount = CloudStorageAccount.Parse(_connectionString); var client = storageAccount.CreateCloudQueueClient(); var queue = client.GetQueueReference(QueueName); var message = new CloudQueueMessage(JsonConvert.SerializeObject(item, Formatting.Indented)); await queue.AddMessageAsync(message); }