public override Task SendUserAsync(string userId, string methodName, object[] args, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(methodName)) { throw new ArgumentException(NullOrEmptyStringErrorMessage, nameof(methodName)); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentException(NullOrEmptyStringErrorMessage, nameof(userId)); } var api = _restApiProvider.GetSendToUserEndpoint(_appName, _hubName, userId); return(_restClient.SendAsync(api, HttpMethod.Post, _productInfo, methodName, args, handleExpectedResponseAsync: null, cancellationToken: cancellationToken)); }
public override Task SendUserAsync(string userId, string methodName, object[] args, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(methodName)) { throw new ArgumentException(NullOrEmptyStringErrorMessage, nameof(methodName)); } if (string.IsNullOrEmpty(userId)) { throw new ArgumentException(NullOrEmptyStringErrorMessage, nameof(userId)); } var api = _restApiProvider.GetSendToUserEndpoint(userId); var request = BuildRequest(api, HttpMethod.Post, methodName, args); return(CallRestApiAsync(request, cancellationToken)); }
public override Task SendUserAsync(string userId, string methodName, object[] args, CancellationToken cancellationToken = default) { var api = _restApiProvider.GetSendToUserEndpoint(userId); return(CallRestApi(api, HttpMethod.Post, methodName, args, cancellationToken)); }