I think it would be better to just use the human-readable name for the OptionTemplate and look up the appropriate integer from a constant dictionary.