public void Unload()
 {
     lock (this.syncObject)
     {
         ProcessAccessManager.UnregisterComponent(this);
     }
     MExEvents.Shutdown();
     StoreDriverSubmission.ShutdownPerformanceCounterMaintenance();
 }
Esempio n. 2
0
 // Token: 0x060005E6 RID: 1510 RVA: 0x00020EF4 File Offset: 0x0001F0F4
 private void Application_End(object sender, EventArgs e)
 {
     Diagnostics.Logger.LogEvent(FrontEndHttpProxyEventLogConstants.Tuple_ApplicationShutdown, null, new object[]
     {
         HttpProxyGlobals.ProtocolType
     });
     RequestDetailsLogger.FlushQueuedFileWrites();
     ProcessAccessManager.UnregisterComponent(SettingOverrideSync.Instance);
 }
 public void Stop()
 {
     this.storeDriverTracer.StoreDriverSubmissionTracer.TracePass(this.storeDriverTracer.MessageProbeActivityId, 0L, "Stop StoreDriverSubmission");
     if (!this.stopped)
     {
         this.stopped = true;
     }
     lock (this.syncObject)
     {
         this.StopSubmission();
         ProcessAccessManager.UnregisterComponent(this);
     }
 }
 public void Stop()
 {
     StoreDriverDeliveryDiagnostics.Diag.TraceDebug(0L, "Stop StoreDriverDelivery");
     if (!this.retired)
     {
         this.Retire();
     }
     lock (this.syncObject)
     {
         this.StopDelivery();
         ProcessAccessManager.UnregisterComponent(this);
     }
 }
Esempio n. 5
0
 public void StopService()
 {
     MrsTracer.Service.Debug("Stopping service...", new object[0]);
     CommonUtils.ServiceIsStopping = true;
     MRSService.lightJobPoller.WaitForJobToBeDone();
     MRSService.jobPoller.WaitForJobToBeDone();
     MailboxSyncerJobs.WaitForAllJobsToComplete();
     ProcessAccessManager.UnregisterComponent(ConfigBase <MRSConfigSchema> .Provider);
     ProcessAccessManager.UnregisterComponent(MRSService.issueCache);
     ProcessAccessManager.UnregisterComponent(this);
     MailboxSyncerJobs.StopScheduling();
     MRSService.LogEvent(MRSEventLogConstants.Tuple_ServiceStopped, new object[0]);
     MrsTracer.Service.Debug("Service stopped.", new object[0]);
 }
 // Token: 0x06000005 RID: 5 RVA: 0x00002438 File Offset: 0x00000638
 protected override void OnStopInternal()
 {
     Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_ServiceStopping, null, new object[0]);
     AssistantsService.TracerPfd.TracePfd <int>((long)this.GetHashCode(), "PFD IWS {0} Stopping the Mailbox Assistants Service", 32151);
     if (this.memoryMonitor != null)
     {
         this.memoryMonitor.Stop();
     }
     if (this.watermarkCleanupTimer != null)
     {
         this.watermarkCleanupTimer.Dispose();
     }
     if (this.databaseManager != null)
     {
         try
         {
             GrayException.MapAndReportGrayExceptions(delegate()
             {
                 this.databaseManager.Stop();
             });
         }
         catch (GrayException arg)
         {
             AssistantsService.Tracer.TraceDebug <AssistantsService, GrayException>((long)this.GetHashCode(), "{0}: Gray Exception reported during shutdown: {1}", this, arg);
         }
         finally
         {
             this.databaseManager.Dispose();
         }
         AssistantsService.TracerPfd.TracePfd <int>((long)this.GetHashCode(), "PFD IWS {0} Stopping the Assistant Infrastructure", 17815);
     }
     MailboxSearchServer.StopServer();
     AssistantsLog.LogServiceStopEvent(this.activityId);
     AssistantsLog.Stop();
     MailboxAssistantsSlaReportLogFactory.StopAll();
     using (Process currentProcess = Process.GetCurrentProcess())
     {
         Globals.Logger.LogEvent(InfoWorkerEventLogConstants.Tuple_ServiceStopped, null, new object[]
         {
             currentProcess.Id,
             "Microsoft Exchange",
             "15.00.1497.010"
         });
     }
     ProcessAccessManager.UnregisterComponent(this);
     ProcessAccessManager.UnregisterComponent(SettingOverrideSync.Instance);
     SettingOverrideSync.Instance.Stop();
     AssistantsService.TracerPfd.TracePfd <int>((long)this.GetHashCode(), "PFD IWS {0} The Mailbox Assistants Service Stopped successfully", 21911);
 }
Esempio n. 7
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();
        }
        // 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");
                }
            }
        }
Esempio n. 9
0
 // Token: 0x0600000A RID: 10 RVA: 0x00002368 File Offset: 0x00000568
 protected override void OnStopInternal()
 {
     this.serviceStopHandle.Set();
     this.logger.Log(MigrationEventType.Verbose, "Stopping MSExchangeWorkflow service.", new object[0]);
     if (this.servicelets != null)
     {
         foreach (IServicelet servicelet in this.servicelets)
         {
             this.logger.Log(MigrationEventType.Information, "Stopping servicelet {0}.", new object[]
             {
                 servicelet.Name
             });
             this.logger.Log(MigrationEventType.Verbose, "Un-registering diagnostics interfaces.", new object[0]);
             foreach (IDiagnosable diagnosable in servicelet.GetDiagnosableComponents())
             {
                 ProcessAccessManager.UnregisterComponent(diagnosable);
             }
             servicelet.Stop();
         }
     }
     this.logger.Log(MigrationEventType.Verbose, "MSExchangeWorkflow service stopped.", new object[0]);
     this.LogEvent(MWSEventLogConstants.Tuple_ServiceStopped, new object[0]);
 }
Esempio n. 10
0
 // Token: 0x0600005A RID: 90 RVA: 0x00002F16 File Offset: 0x00001116
 protected virtual void UnregisterDiagnosticComponents()
 {
     ProcessAccessManager.UnregisterComponent(this);
 }