using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Perforce.P4 { public class TagDictionary : Dictionary<String, String> { /// <summary> /// Basic constrictor /// </summary> public TagDictionary() : base() { } /// <summary> /// Copy constructor /// </summary> /// <param name="obj">Source object</param> public TagDictionary(TagDictionary obj) : base(obj) { } public bool HasKey(String key) { foreach (String srcKey in this.Keys) { if (srcKey.ToLower().Equals(key.ToLower())) return true; } return false; } public String GetKey(String key) { foreach (String srcKey in this.Keys) { if (srcKey.ToLower().Equals(key.ToLower())) return srcKey; } return key; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 12580 | rlranft |
Reparented FormBase to a new intermediate FieldDictionary object derived from Dictionary<string, object> Added HasKey and GetKey methods to do case-insensitive key queries. Reparented TaggedObject to a new intermediate TagDictionary object derived from Dictionary<string, string> Added HasKey and GetKey methods to do case-insensitive key queries. Modified Group initializers to use the case-insensitive queries to load fields. |