/// <summary> /// Send json payload /// </summary> /// <param name="client"></param> /// <param name="payload"></param> /// <param name="contentType"></param> /// <param name="partitionKey"></param> public static Task SendAsync(this IEventQueueClient client, JToken payload, string contentType, string partitionKey) { return(client.SendAsync(payload, new Dictionary <string, string> { [CommonProperties.EventSchemaType] = contentType }, partitionKey)); }
/// <summary> /// Send json payload /// </summary> /// <param name="client"></param> /// <param name="payload"></param> /// <param name="properties"></param> /// <param name="partitionKey"></param> public static Task SendAsync(this IEventQueueClient client, JToken payload, IDictionary <string, string> properties, string partitionKey = null) { return(client.SendAsync(Encoding.UTF8.GetBytes(payload.ToString()), properties, partitionKey)); }