示例#1
0
 /// <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));
 }
示例#2
0
 /// <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));
 }