/// <summary> /// Allows easy retrieval of strings formatted both with /// namespace and element name, given a value /// from the <see cref="CommonPropertyNames"/> /// enumerator. /// </summary> public string this[CommonPropertyNames tag] { get { StringBuilder sb = new StringBuilder(25); string ns = ""; if (tag > CommonPropertyNames.DoNotUse) { ns = "dc:"; } else if (tag < CommonPropertyNames.DoNotUse) { ns = "upnp:"; } else { throw new Exception("Bad Evil. Improper value used to index Tags."); } if (tag == CommonPropertyNames.Class) { sb.AppendFormat("{1}{0}", "class", ns); } else { sb.AppendFormat("{1}{0}", tag.ToString(), ns); } return(sb.ToString()); } }
/// <summary> /// Allows easy retrieval of strings formatted both with /// namespace and element name, given a value /// from the <see cref="CommonPropertyNames"/> /// enumerator. /// </summary> public string this[CommonPropertyNames tag] { get { StringBuilder sb = new StringBuilder(25); string ns = ""; if (tag > CommonPropertyNames.DoNotUse) { ns = "dc:"; } else if (tag < CommonPropertyNames.DoNotUse) { ns = "upnp:"; } else { throw new Exception("Bad Evil. Improper value used to index Tags."); } if (tag == CommonPropertyNames.Class) { sb.AppendFormat("{1}{0}", "class", ns); } else { sb.AppendFormat("{1}{0}", tag.ToString(), ns); } return sb.ToString(); } }