Пример #1
0
        public async Task SendTelemetryValueAsync(string serializedTelemetry)
        {
            var message = new Message(Encoding.UTF8.GetBytes(serializedTelemetry));

            message.ContentType     = "application/json";
            message.ContentEncoding = "utf-8";
            await deviceClient.SendEventAsync(message);
        }
Пример #2
0
 public async Task SendEventAsync(Message message)
 {
     if (client == null)
     {
         await mockClient.SendEventAsync(message);
     }
     else
     {
         await client.SendEventAsync(message);
     }
 }