コード例 #1
0
        private static EventData CreateEventData(SweetsMachineData data)
        {
            var dataAsJson = JsonConvert.SerializeObject(data);
            var eventData  = new EventData(Encoding.UTF8.GetBytes(dataAsJson));

            return(eventData);
        }
コード例 #2
0
 public async Task SendDataAsync(SweetsMachineData sweetsMachineEvent)
 {
     EventData eventData = CreateEventData(sweetsMachineEvent);
     await _eventHubClient.SendAsync(eventData);
 }