CgwMonitorManage.VideoMonitor.VideoMonitorManage.GetMonitorConfig C# (CSharp) Method

GetMonitorConfig() private method

获取监控平台配置
private GetMonitorConfig ( XmlElement monitorElement, string &monitorId, string &className ) : SmcErr
monitorElement System.Xml.XmlElement
monitorId string
className string
return CgwMonitorManage.SmcError.SmcErr
        private SmcErr GetMonitorConfig(XmlElement monitorElement, out string monitorId, out string className)
        {
            NLogEx.LoggerEx logEx = new NLogEx.LoggerEx(log);
            logEx.Trace("Enter: VideoMonitorManage.GetMonitorConfig().");
            SmcErr err = new CgwError();

            monitorId = CommonFunction.GetSingleNodeValue(monitorElement, CgwConst.ID_TAG);

            className = CommonFunction.GetSingleNodeValue(monitorElement, CgwConst.CLASS_TAG);

            if (string.IsNullOrEmpty(monitorId))
            {
                //监控平台id不能为空
                err.SetErrorNo(CgwError.MONITOR_CONFIG_FILE_INVALID_ID_NULL);

                logEx.Error("Monitor id can not be null.");
                return err;
            }

            if (string.IsNullOrEmpty(className))
            {
                //监控平台 {0}的class不能为空
                err.SetErrorNo(CgwError.MONITOR_CONFIG_FILE_INVALID_CLASS_NULL);

                logEx.Error("The class of Monitor is null. Monitor id:{0}.", monitorId);
                return err;
            }

            return err;
        }