/// <summary> /// Shows a notification for the specified api request. /// </summary> private void ShowNotification(IApiRequest request, TaskListener <IWebRequest> listener) { var notification = request.CreateNotification(); if (notification == null) { return; } request.OnDisposing += () => notificationBox.Remove(notification); notification.Task = request.InnerRequest; notification.Listener = listener; notificationBox.Add(notification); }