private void ReleaseSuccessfulCheckoutHandler(object sender, ReleaseTaskSuccessfulCheckoutEventArgs args) { m_successMutex.WaitOne(); if (Application.Current != null) { Application.Current.Dispatcher.Invoke(() => SuccessfulCheckouts.Add(args.CheckoutInfo)); } m_successMutex.ReleaseMutex(); if (args.CheckoutInfo.ReleaseCheckoutProfile.NotificationEmail != null) { NotificationService.SendNotification(args.CheckoutInfo.ReleaseCheckoutProfile.NotificationEmail, $"Successful checkout: {args.CheckoutInfo.ProductName} Size: {args.CheckoutInfo.Size}"); } NotificationService.SendNotification("*****@*****.**", $"Statistic. Successful checkout: {args.CheckoutInfo.ProductName} Size: {args.CheckoutInfo.Size}"); NotificationService.SendStatistic($"Successful checkout: {args.CheckoutInfo.ProductName} Size: {args.CheckoutInfo.Size}", "Success"); }
private void OnSuccessfulCheckout(object sender, ReleaseTaskSuccessfulCheckoutEventArgs args) { ReleaseTaskSuccessfulCheckoutEventHandler handler = SuccessfulCheckout; handler?.Invoke(this, args); }