/[xmltv_parser]/trunk/libxmltv/Core/PropertyList.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/PropertyList.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/libxmltv/Core/PropertyList.cs	2013/03/10 08:21:30	92
+++ trunk/libxmltv/Core/PropertyList.cs	2013/03/10 09:01:33	95
@@ -9,88 +9,22 @@
     public class PropertyList : PropertyList<string, object>, IPropertyList { }
     public class PropertyList<TKey, TValue> : IPropertyList<PropertyValuePair<TKey, TValue>>
     {
-        private List<List<PropertyValuePair<TKey, TValue>>> properties;
-
-        public PropertyList() { properties = new List<List<PropertyValuePair<TKey, TValue>>>(); }
-        public PropertyList(IEnumerable<List<PropertyValuePair<TKey, TValue>>> collection) { properties = new List<List<PropertyValuePair<TKey, TValue>>>(collection); }
-        public PropertyList(int capacity) { properties = new List<List<PropertyValuePair<TKey, TValue>>>(); }
-
-
-        public PropertyValuePair<TKey, TValue> this[int index]
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-            set
-            {
-                throw new NotImplementedException();
-            }
-        }
-
-        public int IndexOfProperty(PropertyValuePair<TKey, TValue> item)
-        {
-            throw new NotImplementedException();
-        }
-
-        public void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item)
-        {
-            throw new NotImplementedException();
-        }
-
-        public void RemovePropertyAt(int index)
-        {
-            throw new NotImplementedException();
-        }
-
-        public int PropertyCount
-        {
-            get { throw new NotImplementedException(); }
-        }
-
-        public bool IsReadOnly
-        {
-            get { throw new NotImplementedException(); }
-        }
-
-        public void AddProperty(PropertyValuePair<TKey, TValue> item)
-        {
-            throw new NotImplementedException();
-        }
-
-        public void ClearProperties()
-        {
-            throw new NotImplementedException();
-        }
-
-        public bool ContainsProperty(PropertyValuePair<TKey, TValue> item)
-        {
-            throw new NotImplementedException();
-        }
-
-        public void CopyPropertiesTo(PropertyValuePair<TKey, TValue>[] array, int arrayIndex)
-        {
-            throw new NotImplementedException();
-        }
-
-        public bool RemoveProperty(PropertyValuePair<TKey, TValue> item)
-        {
-            throw new NotImplementedException();
-        }
-
-        public IEnumerator<PropertyValuePair<TKey, TValue>> GetEnumerator()
-        {
-            throw new NotImplementedException();
-        }
-
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
-        {
-            throw new NotImplementedException();
-        }
-
-        IEnumerator<List<PropertyValuePair<TKey, TValue>>> IEnumerable<List<PropertyValuePair<TKey, TValue>>>.GetEnumerator()
-        {
-            throw new NotImplementedException();
-        }
+        private List<PropertyValuePair<TKey, TValue>> properties;
+        public PropertyList() { properties = new List<PropertyValuePair<TKey, TValue>>(); }
+        public PropertyList(IEnumerable<PropertyValuePair<TKey, TValue>> collection) { properties = new List<PropertyValuePair<TKey, TValue>>(collection); }
+        public PropertyList(int capacity) { properties = new List<PropertyValuePair<TKey, TValue>>(); }
+        public PropertyValuePair<TKey, TValue> this[int index] { get { return properties[index]; } set { properties[index] = value; } }
+        public int IndexOfProperty(PropertyValuePair<TKey, TValue> item) { return properties.IndexOf(item); }
+        public void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item) { properties.Insert(index, item); }
+        public void RemovePropertyAt(int index) { properties.RemoveAt(index); }
+        public int PropertyCount { get { return properties.Count; } }
+        public bool IsReadOnly { get { return (properties as IPropertyCollection<TKey>).IsReadOnly; } }
+        public void AddProperty(PropertyValuePair<TKey, TValue> item) { properties.Add(item); }
+        public void ClearProperties() { properties.Clear(); }
+        public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return properties.Contains(item); }
+        public void CopyPropertiesTo(PropertyValuePair<TKey, TValue>[] array, int arrayIndex) { properties.CopyTo(array, arrayIndex); }
+        public bool RemoveProperty(PropertyValuePair<TKey, TValue> item) { return properties.Remove(item); }
+        public IEnumerator<PropertyValuePair<TKey, TValue>> GetEnumerator() { return properties.GetEnumerator(); }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22