public Task Publish(string key, string value) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); } return(_messageBusPublisher.Publish(key, value)); }
public static void PublishObject(this IMessageBusPublisher messageBusPublisher, string key, object value) { var stringValue = JsonConvert.SerializeObject(value); messageBusPublisher.Publish(key, stringValue); }