Beispiel #1
0
 // Token: 0x06001434 RID: 5172 RVA: 0x000749A4 File Offset: 0x00072BA4
 internal static void LogSendPublishNotificationException(Exception exception, MailboxNotificationBatch batch = null)
 {
     PushNotificationsMonitoring.PublishFailureNotification("SendPublishNotification", "", "");
     ExTraceGlobals.PushNotificationAssistantTracer.TraceError <string, string>(0L, "An error '{0}'-'{1}' was generated when publishing a notification batch.", exception.ToString(), (exception.InnerException != null) ? exception.InnerException.ToString() : string.Empty);
     PushNotificationsCrimsonEvents.SendPublishNotificationException.LogPeriodic <string>(exception.Message, CrimsonConstants.DefaultLogPeriodicSuppressionInMinutes, exception.ToTraceString());
     if (batch != null && batch.Notifications != null)
     {
         foreach (MailboxNotification notification in batch.Notifications)
         {
             NotificationTracker.ReportDropped(notification, exception.ToTraceString());
         }
     }
 }
        // Token: 0x06001401 RID: 5121 RVA: 0x00073E68 File Offset: 0x00072068
        private void SendPublishNotificationRequest(MailboxNotificationBatch batch)
        {
            AverageTimeCounter requestCounter = new AverageTimeCounter(PushNotificationsAssistantPerfCounters.AveragePublishingRequestProcessing, PushNotificationsAssistantPerfCounters.AveragePublishingRequestProcessingBase, true);

            this.publisherClient.BeginPublishNotifications(batch, delegate(IAsyncResult asyncResult)
            {
                object asyncState = asyncResult.AsyncState;
                try
                {
                    this.publisherClient.EndPublishNotifications(asyncResult);
                    PushNotificationsMonitoring.PublishSuccessNotification("SendPublishNotification", "");
                }
                catch (Exception exception)
                {
                    PushNotificationsAssistantPerfCounters.PublishingRequestErrors.Increment();
                    PushNotificationHelper.LogSendPublishNotificationException(exception, null);
                }
                finally
                {
                    requestCounter.Stop();
                }
            }, requestCounter);
        }