예제 #1
0
        protected override void DoConfigure(IConfigSectionNode node)
        {
            string ip = "--";

            try
            {
                if (node == null)
                {
                    node = App.ConfigRoot[CONFIG_ZONE_GOVERNOR_SECTION];
                }

                base.DoConfigure(node);

                ip = "A";

                var siNode = node[CONFIG_SUB_INSTRUMENTATION_SECTION];
                m_SubInstr.Configure(siNode);

                ip = "B";

                m_SubInstrReductionLevels.Clear();
                foreach (var tn in siNode[CONFIG_REDUCE_DETAIL_SECTION].Children.Where(cn => cn.IsSameName(CONFIG_TYPE_SECTION)))
                {
                    var tname = tn.AttrByName(Configuration.CONFIG_NAME_ATTR).Value;
                    if (tname.IsNullOrWhiteSpace())
                    {
                        continue;
                    }
                    m_SubInstrReductionLevels[tname] = tn.AttrByName(CONFIG_LEVEL_ATTR).ValueAsInt();
                }

                ip = "C";

                var slNode = node[CONFIG_SUB_LOG_SECTION];
                m_SubLog.Configure(slNode);

                ip = "D";

                m_Locker.Configure(node[LockServerService.CONFIG_LOCK_SERVER_SECTION]);

                ip = "E";

                WriteLog(MessageType.Info, nameof(DoConfigure), "Configured OK. ip=" + ip);
            }
            catch (Exception error)
            {
                var msg = "Error after '{0}' during ZoneGovernorService configuration: {1}".Args(ip, error.ToMessageWithType());
                WriteLog(MessageType.CatastrophicError, nameof(DoConfigure), msg, error);
                throw new AZGOVException(msg, error);
            }
        }
예제 #2
0
 protected override void DoConfigure(IConfigSectionNode node)
 {
     base.DoConfigure(node);
     m_Daemon.Configure(node);
 }