Exemplo n.º 1
0
        /// <summary>
        /// Check for duplicate variable names.
        /// </summary>
        /// <remarks>
        /// This check should apply to the following two scenarios:
        /// <list>
        /// Two or more data elements have the same variable name in the Dataset section
        /// Two or more data elements in a struct have the same variable name
        /// </list>
        /// </remarks>
        /// <param name="aNode"></param>
        /// <param name="varNames"></param>
        /// <param name="report"></param>
        private static void checkVarNames(AbstractNode aNode, Hashtable varNames, ArrayList report)
        {
            string sVarName = aNode.getVarName();

            if (sVarName != null && sVarName.Length > 0)
            {
                if (varNames.Contains(sVarName))
                {
                    report.Add("Warning: duplicate variable name '" + sVarName + "' in '" + aNode.toNodeText() + "'.");
                }
                else
                {
                    varNames.Add(sVarName, sVarName);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Check for duplicate variable names.
 /// </summary>
 /// <remarks>
 /// This check should apply to the following two scenarios:
 /// <list>
 /// Two or more data elements have the same variable name in the Dataset section
 /// Two or more data elements in a struct have the same variable name
 /// </list>
 /// </remarks>
 /// <param name="aNode"></param>
 /// <param name="varNames"></param>
 /// <param name="report"></param>
 private static void checkVarNames(AbstractNode aNode, Hashtable varNames, ArrayList report)
 {
     string sVarName = aNode.getVarName();
     if (sVarName!=null && sVarName.Length > 0)
     {
         if (varNames.Contains(sVarName))
         {
             report.Add("Warning: duplicate variable name '" + sVarName + "' in '" + aNode.toNodeText() + "'.");
         }
         else
         {
             varNames.Add(sVarName, sVarName);
         }
     }
 }