static ServicedComponentProxy() { try { System.EnterpriseServices.BooleanSwitch switch2 = new System.EnterpriseServices.BooleanSwitch("DisableAsyncFinalization"); _asyncFinalizeEnabled = !switch2.Enabled; } catch (Exception exception) { if ((exception is NullReferenceException) || (exception is SEHException)) { throw; } _asyncFinalizeEnabled = true; } if (_asyncFinalizeEnabled) { _ctxQueue = new Queue(); _gitQueue = new Queue(); _Wakeup = new AutoResetEvent(false); _exitCleanupThread = new ManualResetEvent(false); _cleanupThread = new Thread(new ThreadStart(ServicedComponentProxy.QueueCleaner)); _cleanupThread.IsBackground = true; _cleanupThread.Start(); AppDomain.CurrentDomain.DomainUnload += new EventHandler(ServicedComponentProxy.ShutdownDomain); } }
public static void InitDBG() { if (!_initialized) { lock (initializeLock) { if (!_initialized) { new RegistryPermission(PermissionState.Unrestricted).Assert(); _genSwitch = new System.EnterpriseServices.TraceSwitch("General"); _platSwitch = new System.EnterpriseServices.TraceSwitch("Platform"); _regSwitch = new System.EnterpriseServices.TraceSwitch("Registration"); _crmSwitch = new System.EnterpriseServices.TraceSwitch("CRM"); _perfSwitch = new System.EnterpriseServices.TraceSwitch("PerfLog"); _poolSwitch = new System.EnterpriseServices.TraceSwitch("ObjectPool"); _thkSwitch = new System.EnterpriseServices.TraceSwitch("Thunk"); _scSwitch = new System.EnterpriseServices.TraceSwitch("ServicedComponent"); _conSwitch = new System.EnterpriseServices.BooleanSwitch("ConsoleOutput"); _dbgDisable = new System.EnterpriseServices.BooleanSwitch("DisableDebugOutput"); _stackSwitch = new System.EnterpriseServices.BooleanSwitch("PrintStacks"); _initialized = true; } } } }