Exemple #1
0
        /// <summary>
        /// Checks enabled options in the command reference values from specified term attribute
        /// If option has reference to non-existen option the <exception cref="FormatException">FormatException</exception> will be thrown.
        /// </summary>
        /// <param name="hashSetNames"></param>
        /// <param name="termOfName"></param>
        public void VerifyLinksFromTermToOption(HashSet <string> hashSetNames, DrCmdOptionSettings termOfName)
        {
            var termsOfArray = GetAttributeValue(termOfName, string.Empty).GetValueAsStringArray();

            foreach (var item in termsOfArray)
            {
                if (!hashSetNames.Contains(item))
                {
                    throw new FormatException(string.Format(Msg.REFERENCE_TO_NON_EXISTEN_OPTION, Command.Name, Name, termOfName, item));
                }
            }
        }
Exemple #2
0
 /// <summary>
 /// Checks enabled options in the command reference values from specified term attribute
 /// If option has reference to non-existen option the <exception cref="FormatException">FormatException</exception> will be thrown.
 /// </summary>
 /// <param name="hashSetNames"></param>
 /// <param name="termOfName"></param>
 public void VerifyLinksFromTermToOption(HashSet<string> hashSetNames, DrCmdOptionSettings termOfName)
 {
     var termsOfArray = GetAttributeValue(termOfName, string.Empty).GetValueAsStringArray();
     foreach (var item in termsOfArray)
     {
         if (!hashSetNames.Contains(item)) throw new FormatException(string.Format(Msg.REFERENCE_TO_NON_EXISTEN_OPTION, Command.Name, Name, termOfName, item));
     }
 }