Esempio n. 1
0
 /// <summary>
 /// Send message
 /// </summary>
 /// <param name="context">Send message context</param>
 /// <returns>Return send result</returns>
 public async Task <SendMessageResult> SendAsync(SendMessageContext context)
 {
     if (HandlerFunc == null)
     {
         throw new ArgumentNullException(nameof(HandlerFunc));
     }
     return(await HandlerFunc(context).ConfigureAwait(false));
 }
Esempio n. 2
0
 /// <summary>
 /// Send message
 /// </summary>
 /// <param name="context">Send message context</param>
 /// <returns>Return send result</returns>
 public SendMessageResult Send(SendMessageContext context)
 {
     return(SendAsync(context).Result);
 }