public async Task <int[]> SendProductsAsync(Article[] products, bool isStage, string userName, int userId, bool localize, bool autopublish, string[] forcedСhannels = null) { var token = CallMethod("SendProductsAsync", "isStage = {0}", isStage); var result = await _notificationService.SendProductsAsync(products, isStage, userName, userId, localize, autopublish, forcedСhannels); EndMethod(token); return(result); }
override public async Task <ActionTaskResult> Process(ActionContext context) { Throws.IfArgumentNull(context, _ => context); string id = "id" + Guid.NewGuid(); var products = DoWithLogging("_productService.GetProductsByIds", id, () => _productService.GetProductsByIds(context.ContentItemIds)); try { await _notificationService.SendProductsAsync(products, true, context.UserName, context.UserId, false, false); } catch (Exception ex) { throw new ActionException("There are some errors occured. ", new[] { ex }, context); } return(null); }