private Boolean checkDatatypes(Hashtable Opts, String keyValue, String keyOptions) { Boolean valid = false; valid = Opts.ContainsKey(keyValue); if (valid) { OptionSpec oSpec = (OptionSpec)Opts[keyValue]; String dataType = oSpec.getOptionType(); Boolean result = validateDataType(dataType, keyOptions); return(result); } else { return(false); } }
private void print_options(Hashtable Opts) { String type = ""; String defaultVal = ""; IEnumerator It; String help = ""; ICollection generalKeys = (ICollection)Opts.Keys; It = generalKeys.GetEnumerator(); while (It.MoveNext()) { String keyValue = It.Current.ToString(); OptionSpec oSpec = (OptionSpec)Opts[keyValue]; if ((oSpec.getOptionType() != null) && (oSpec.getOptionDefault() != null)) { type = oSpec.getOptionType(); defaultVal = oSpec.getOptionDefault(); Console.WriteLine(" --" + keyValue + " < type " + type + ", default " + defaultVal + ">"); } if ((oSpec.getOptionDefault() != null) && (oSpec.getOptionType() == null)) { defaultVal = oSpec.getOptionDefault(); Console.WriteLine(" --" + keyValue + " < default " + defaultVal + " >"); } else if ((oSpec.getOptionType() != null) && (oSpec.getOptionDefault() == null)) { type = oSpec.getOptionType(); Console.WriteLine(" --" + keyValue + " < type " + type + " >"); } else if ((oSpec.getOptionType() == null) && (oSpec.getOptionDefault() == null)) { Console.WriteLine(" --" + keyValue + " "); } help = oSpec.getOptionDesc(); Console.WriteLine(" " + help); } }