public async Task SendAsync <T>(T obj) where T : BaseQueueMessage { var queueReference = _cloudQueueClientFactory.GetClient().GetQueueReference(obj.Route); await queueReference.CreateIfNotExistsAsync(); var serialize = _messageSerializer.Serialize(obj); var queueMessage = new CloudQueueMessage(serialize); await queueReference.AddMessageAsync(queueMessage); }
// Adding the generic type to the message sending public async Task SendAsync(string obj) { // Grabbing the reference to the Queue var queueReference = _cloudQueueClientFactory.GetClient().GetQueueReference(RouteNames.LinksBox); await queueReference.CreateIfNotExistsAsync(); var queueMessage = new CloudQueueMessage(obj); await queueReference.AddMessageAsync(queueMessage); }