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;
}