コード例 #1
0
 /// <summary>
 /// Send message
 /// </summary>
 /// <param name="message"></param>
 /// <returns></returns>
 private Task SendAsync(DiscoveryMessageModel message)
 {
     return(Try.Async(() => _events.SendAsync(
                          Encoding.UTF8.GetBytes(JsonConvertEx.SerializeObject(message)),
                          ContentTypes.DiscoveryMessage)));
 }
コード例 #2
0
 /// <summary>
 /// Send message
 /// </summary>
 /// <param name="message"></param>
 private void Send(DiscoveryMessageModel message)
 {
     _processor.TrySchedule(() => SendAsync(message));
 }