using System; using System.Text; using System.Collections.Specialized; namespace P4API { /// /// Subclass of StringDictionary which provides additional methods for dealing with the psuedo-arrays passed from Perforce. /// public class P4ResultRecord : StringDictionary { internal P4ResultRecord(StringDictionary sd) { foreach (string s in sd.Keys) { base.Add(s, sd[s]); } } public string[] getArray(string var) { throw new System.NotImplementedException(); } public void setArray(string[] varArray) { throw new System.NotImplementedException(); } public override string ToString() { StringBuilder sb = new StringBuilder(); foreach (string s in this.Keys) { sb.Append(String.Format("{0} : {1}\n", s, this[s])); } return sb.ToString(); } /// /// If the underlying P4Result has a key of "var1", it is assumed that this variable is an array, and will return as such. /// public bool isArray(string var) { throw new System.NotImplementedException(); } } }