// Token: 0x06000010 RID: 16 RVA: 0x00002290 File Offset: 0x00000490
        public static void Main(string[] args)
        {
            bool flag  = false;
            bool flag2 = false;

            foreach (string text in args)
            {
                if (text.StartsWith("-?", StringComparison.Ordinal))
                {
                    FrontEndTransportService.Usage();
                    Environment.Exit(0);
                }
                else if (text.StartsWith("-console"))
                {
                    flag = true;
                }
                else if (text.StartsWith("-wait"))
                {
                    flag2 = true;
                }
            }
            FrontEndTransportService.runningAsService = !Environment.UserInteractive;
            if (!FrontEndTransportService.runningAsService)
            {
                if (!flag)
                {
                    FrontEndTransportService.Usage();
                    Environment.Exit(0);
                }
                Console.WriteLine("Starting {0}, running in console mode.", Assembly.GetExecutingAssembly().GetName().Name);
                if (flag2)
                {
                    Console.WriteLine("Press ENTER to continue.");
                    Console.ReadLine();
                }
            }
            Globals.InitializeSinglePerfCounterInstance();
            ExWatson.Register();
            string text2;

            if (!Components.TryLoadTransportAppConfig(out text2))
            {
                Environment.Exit(1);
            }
            SettingOverrideSync.Instance.Start(true);
            FrontEndTransportService.instance = new FrontEndTransportService();
            if (FrontEndTransportService.runningAsService)
            {
                ServiceBase.Run(FrontEndTransportService.instance);
                return;
            }
            ExServiceBase.RunAsConsole(FrontEndTransportService.instance);
        }
 // Token: 0x06000011 RID: 17 RVA: 0x00002394 File Offset: 0x00000594
 protected override void OnStartInternal(string[] args)
 {
     if (!VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).Transport.ADExceptionHandling.Enabled)
     {
         FrontEndTransportService.ConstructComponentLoadTree();
     }
     else
     {
         ADOperationResult adoperationResult = ADNotificationAdapter.TryRunADOperation(new ADOperation(FrontEndTransportService.ConstructComponentLoadTree), 3);
         if (!adoperationResult.Succeeded)
         {
             FrontEndTransportService.eventLog.LogEvent(TransportEventLogConstants.Tuple_FrontendTransportServiceInitializationFailure, null, new object[]
             {
                 adoperationResult.Exception.ToString()
             });
             base.GracefullyAbortStartup();
         }
     }
     this.components.Start(new Components.StopServiceHandler(FrontEndTransportService.OnStopServiceBecauseOfFailure), false, false, true, true);
     this.components.Continue();
 }