// Token: 0x06000008 RID: 8 RVA: 0x00002570 File Offset: 0x00000770
 protected override void OnStopInternal()
 {
     base.OnStopInternal();
     if (this.rpcServerStarted)
     {
         try
         {
             ActiveMonitoringRpcServer.Stop();
         }
         catch (Exception ex)
         {
             ExTraceGlobals.ServiceTracer.TraceDebug(0L, string.Format("Trying to stop RPC server failed with the following exception: {0}", ex.Message));
         }
     }
 }
        // Token: 0x06000006 RID: 6 RVA: 0x00002400 File Offset: 0x00000600
        protected override void OnStartInternal(string[] args)
        {
            MonitoringService.LogDiagnosticInfo("Starting the Active Monitoring RPC server", new object[0]);
            ExTraceGlobals.ServiceTracer.TraceDebug(0L, "Starting RPC server");
            bool flag = false;

            foreach (string text in args)
            {
                if (text.StartsWith("-NoWorker", StringComparison.OrdinalIgnoreCase))
                {
                    flag = true;
                }
            }
            try
            {
                MonitoringService.ConfigureRpc();
                ActiveMonitoringRpcServer.Start(new ActiveMonitoringRpcServer.DiagnosticLogger(MonitoringService.LogDiagnosticInfo));
                this.rpcServerStarted = true;
                MonitoringService.LogDiagnosticInfo("Started the Active Monitoring RPC server successfully", new object[0]);
            }
            catch (Exception ex)
            {
                MonitoringService.LogDiagnosticInfo("Active monitoring RPC server fails to start: {0}", new object[]
                {
                    ex.Message
                });
                ExTraceGlobals.ServiceTracer.TraceError(0L, string.Format("Active monitoring RPC server fails to start: {0}", ex.Message));
                MonitoringService.logger.LogEvent(MSExchangeHMEventLogConstants.Tuple_RpcServerFailedToStart, null, new object[]
                {
                    ex.Message
                });
            }
            if (!flag)
            {
                base.OnStartInternal(args);
            }
        }