コード例 #1
0
        // Token: 0x06000006 RID: 6 RVA: 0x00002558 File Offset: 0x00000758
        protected override void OnStopInternal()
        {
            MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.StopService);
            MailboxTransportDeliveryService.isExiting = true;
            ADNotificationListener.Stop();
            MailboxTransportDeliveryService.diag.TraceDebug <DateTime>(0L, "Stopping MailTransportDeliveryService ({0})", DateTime.UtcNow);
            bool flag = false;

            try
            {
                MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.StopBackgroundThread);
                if (MailboxTransportDeliveryService.backgroundThread != null)
                {
                    MailboxTransportDeliveryService.backgroundThread.Stop();
                }
                if (this.isDiagnosticHandlerRegisteredForSettingOverrideSync)
                {
                    try
                    {
                        ProcessAccessManager.UnregisterComponent(SettingOverrideSync.Instance);
                    }
                    catch (RpcException ex)
                    {
                        MailboxTransportDeliveryService.diag.TraceError <string>(0L, "Failed to unregister SettingOverride component with Rpc Server. Error : {0}", ex.ToString());
                    }
                }
                SettingOverrideSync.Instance.Stop();
                MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.StopMessageTracking);
                MessageTrackingLog.Stop();
                MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.StopConfiguration);
                DeliveryConfiguration.Instance.Unload();
                MailboxTransportEventLogger.LogEvent(MSExchangeDeliveryEventLogConstants.Tuple_DeliveryServiceStopSuccess, null, new string[0]);
                MailboxTransportDeliveryService.diag.TraceDebug(0L, "Stopped MailboxDeliveryService");
                MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.UngregisterPamComponent);
                ProcessAccessManager.UnregisterComponent(this);
                MailboxTransportDeliveryService.LogStage(MailboxTransportDeliveryService.Stage.ServiceStopped);
                flag = true;
            }
            finally
            {
                if (!flag)
                {
                    MailboxTransportEventLogger.LogEvent(MSExchangeDeliveryEventLogConstants.Tuple_DeliveryServiceStopFailure, null, new string[0]);
                    MailboxTransportDeliveryService.diag.TraceError(0L, "Failed to stop MailboxDeliveryService");
                }
            }
            DeliveryThrottling.Instance.Dispose();
        }
コード例 #2
0
 // Token: 0x0600002C RID: 44 RVA: 0x00003688 File Offset: 0x00001888
 internal override void OnStop()
 {
     lock (ModeratedDLApplication.SyncRoot)
     {
         ModeratedDLApplication.refCount--;
         if (ModeratedDLApplication.refCount == 0)
         {
             if (this.serverConfigNotificationCookie != null)
             {
                 ADNotificationAdapter.UnregisterChangeNotification(this.serverConfigNotificationCookie);
                 this.serverConfigNotificationCookie = null;
             }
             MessageTrackingLog.Stop();
         }
     }
     base.OnStop();
 }
        // Token: 0x06000019 RID: 25 RVA: 0x00002A5C File Offset: 0x00000C5C
        private void OnStopInternalHelper()
        {
            MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.StopService);
            ADNotificationListener.Stop();
            MailboxTransportSubmissionService.StoreDriverTracer.ServiceTracer.TracePass <DateTime>(MailboxTransportSubmissionService.StoreDriverTracer.MessageProbeActivityId, 0L, "Stopping MailboxTransportSubmissionService ({0})", DateTime.UtcNow);
            bool flag = false;

            try
            {
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.StopBackgroundThread);
                if (MailboxTransportSubmissionService.backgroundThread != null)
                {
                    MailboxTransportSubmissionService.backgroundThread.Stop();
                }
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.StopDatabaseManager);
                if (this.databaseManager != null)
                {
                    this.databaseManager.Stop();
                    this.databaseManager.Dispose();
                }
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.StopMessageTracking);
                MessageTrackingLog.Stop();
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.StopConfiguration);
                SubmissionConfiguration.Instance.Unload();
                MailboxTransportSubmissionEventLogger.LogEvent(MSExchangeSubmissionEventLogConstants.Tuple_SubmissionServiceStopSuccess, null, new object[0]);
                MailboxTransportSubmissionService.StoreDriverTracer.ServiceTracer.TracePass(MailboxTransportSubmissionService.StoreDriverTracer.MessageProbeActivityId, 0L, "Stopped MailboxTransportSubmissionService");
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.UngregisterPamComponent);
                ProcessAccessManager.UnregisterComponent(this);
                MailboxTransportSubmissionService.LogStage(MailboxTransportSubmissionService.Stage.ServiceStopped);
                flag = true;
            }
            finally
            {
                if (!flag)
                {
                    MailboxTransportSubmissionEventLogger.LogEvent(MSExchangeSubmissionEventLogConstants.Tuple_SubmissionServiceStopFailure, null, new object[0]);
                    MailboxTransportSubmissionService.StoreDriverTracer.ServiceTracer.TraceFail(MailboxTransportSubmissionService.StoreDriverTracer.MessageProbeActivityId, 0L, "Failed to stop MailboxTransportSubmissionService");
                }
            }
        }