Exemplo n.º 1
0
        /// <summary>
        /// Init the handler, for loading the config file.
        /// </summary>
        public override void Init(HandlerConfig oConfig)
        {
            lock (_monitor)
            {
                m_sConfigFile = FixConfigPath(oConfig.ConfigFile);

                //if (Path.IsPathRooted(oConfig.ConfigFile))
                //    m_sConfigFile = oConfig.ConfigFile;
                //else
                //    m_sConfigFile = AppDomain.CurrentDomain.BaseDirectory + "config/" + oConfig.ConfigFile;

                m_oConfig = (FileHandlerConfig)LoggerUtils.XMLSerializer.DeserializeObjectFromFile(typeof(FileHandlerConfig), m_sConfigFile);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Init the handler, for loading the config file.
        /// </summary>
        public override void Init(HandlerConfig oConfig)
        {
            lock (_monitor)
            {
                m_sConfigFile = FixConfigPath(oConfig.ConfigFile);

                //if (Path.IsPathRooted(oConfig.ConfigFile))
                //    m_sConfigFile = oConfig.ConfigFile;
                //else
                //    m_sConfigFile = AppDomain.CurrentDomain.BaseDirectory + "config/" + oConfig.ConfigFile;

                m_oConfig = (FileHandlerConfig)LoggerUtils.XMLSerializer.DeserializeObjectFromFile(typeof(FileHandlerConfig), m_sConfigFile);
            }
        }