public string this[string key] { get { if (schemas.Count(s => s.ElementKey == key) == 1) { return(schemas[key].Value); } throw new ArgumentException(string.Format("No schemas or more than one schema configured with key '{0}'.", key)); } }