/// <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)); }
/// <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); }