Ejemplo n.º 1
0
        private static void InitializeCLRListener(ListenerConfiguration configuration)
        {
            try
            {
                lock (m_ListenerLock)
                {
                    if (m_CLRListener == null)
                    {
                        m_CLRListener = new CLRListener();
                    }

                    //it slices and dices what is allowed internally.
                    m_CLRListener.Initialize(configuration);

                    System.Threading.Monitor.PulseAll(m_ListenerLock);
                }
            }
            catch (Exception ex)
            {
                GC.KeepAlive(ex);
#if DEBUG
                Log.Write(LogMessageSeverity.Error, LogWriteMode.Queued, ex, "Gibraltar.Agent", "Error while Initializing Common Language Runtime Listener",
                          "While attempting to do a routine initialization / re-initialization of the CLR listener, an exception was raised: {0}", ex.Message);
#endif
            }
        }
Ejemplo n.º 2
0
        private static void InitializeCLRListener(ListenerConfiguration configuration)
        {
            try
            {
                lock (m_ListenerLock)
                {
                    if (m_CLRListener == null)
                    {
                        m_CLRListener = new CLRListener();
                    }

                    //it slices and dices what is allowed internally.
                    m_CLRListener.Initialize(configuration);

                    System.Threading.Monitor.PulseAll(m_ListenerLock);
                }
            }
            catch (Exception ex)
            {
                GC.KeepAlive(ex);

                if (!Log.SilentMode)
                {
                    Log.Write(LogMessageSeverity.Error, LogWriteMode.Queued, ex, true, "Gibraltar.Agent",
                              "Unable to initialize Common Language Runtime Listener due to " + ex.GetBaseException().GetType().Name,
                              "While attempting to do a routine initialization / re-initialization of the CLR listener, an exception was thrown: {0}", ex.Message);
                }
            }
        }