public string this[ArgumentDescription argDesc] { get { if (!ArgDescMap.TryGetValue(argDesc, out string val)) { return(ConfigurationManager.AppSettings[argDesc.Name]); } return(val); } }
public T GetAsType <T>(ArgumentDescription argDesc) { string value = this[argDesc]; try { var converter = TypeDescriptor.GetConverter(typeof(T)); return((T)(converter.ConvertFromInvariantString(value))); } catch (NotSupportedException) { return(default);