/[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 11:08:58	102
+++ trunk/libxmltv/Core/PropertyList.cs	2013/03/10 11:35:26	105
@@ -9,20 +9,20 @@
     public class PropertyList : PropertyList<string, object>, IPropertyList 
     {
         public PropertyList() :base() { }
-        public PropertyList(IEnumerable<PropertyValuePair<string, object>> collection) : base(collection) { }
+        public PropertyList(IEnumerable<IPropertyValuePair<string, object>> collection) : base(collection) { }
         public PropertyList(int capacity) : base(capacity) { }
     }
     public class PropertyList<TKey, TValue> : IPropertyList<TKey, TValue>
     {
-        private PropertyCollection<PropertyValuePair<TKey, TValue>> properties;
-        public PropertyList() { properties = new PropertyCollection<PropertyValuePair<TKey, TValue>>(); }
-        public PropertyList(IEnumerable<PropertyValuePair<TKey, TValue>> collection) : this() { foreach (var p in collection) { properties.AddProperty(p); } }
+        private PropertyCollection<IPropertyValuePair<TKey, TValue>> properties;
+        public PropertyList() { properties = new PropertyCollection<IPropertyValuePair<TKey, TValue>>(); }
+        public PropertyList(IEnumerable<IPropertyValuePair<TKey, TValue>> collection) : this() { foreach (var p in collection) { properties.AddProperty(p); } }
         public PropertyList(int capacity)
         {
-            properties = new PropertyCollection<PropertyValuePair<TKey, TValue>>();
+            properties = new PropertyCollection<IPropertyValuePair<TKey, TValue>>();
         }
-        public PropertyValuePair<TKey, TValue> this[int index] { get { return properties.ToList()[index]; } set { properties.ToList()[index] = value; } }
-        public IEnumerable<PropertyValuePair<TKey, TValue>> this[TKey name] 
+        public IPropertyValuePair<TKey, TValue> this[int index] { get { return properties.ToList()[index]; } set { properties.ToList()[index] = value; } }
+        public IEnumerable<IPropertyValuePair<TKey, TValue>> this[TKey name] 
         {
             get
             {
@@ -34,8 +34,8 @@
                 return list;
             }
         }
-        public int IndexOfProperty(PropertyValuePair<TKey, TValue> item) { return properties.ToList().IndexOf(item); }
-        public void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item) { properties.ToList().Insert(index, item); }
+        public int IndexOfProperty(IPropertyValuePair<TKey, TValue> item) { return properties.ToList().IndexOf(item); }
+        public void InsertPropertyAtIndex(int index, IPropertyValuePair<TKey, TValue> item) { properties.ToList().Insert(index, item); }
         public void RemovePropertyAt(int index) { properties.RemoveProperty(this[index]); }
         public int PropertyCount { get { return properties.PropertyCount; } }
         public bool IsReadOnly
@@ -50,12 +50,12 @@
                 return collection.IsReadOnly;
             }
         }
-        public void AddProperty(PropertyValuePair<TKey, TValue> item) { properties.AddProperty(item); }
+        public void AddProperty(IPropertyValuePair<TKey, TValue> item) { properties.AddProperty(item); }
         public void ClearProperties() { properties.ClearProperties(); }
-        public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return properties.Contains(item); }
-        public void CopyPropertiesTo(PropertyValuePair<TKey, TValue>[] array, int arrayIndex) { properties.CopyPropertiesTo(array, arrayIndex); }
-        public bool RemoveProperty(PropertyValuePair<TKey, TValue> item) { return properties.RemoveProperty(item); }
-        public IEnumerator<PropertyValuePair<TKey, TValue>> GetEnumerator() { return properties.GetEnumerator(); }
+        public bool ContainsProperty(IPropertyValuePair<TKey, TValue> item) { return properties.Contains(item); }
+        public void CopyPropertiesTo(IPropertyValuePair<TKey, TValue>[] array, int arrayIndex) { properties.CopyPropertiesTo(array, arrayIndex); }
+        public bool RemoveProperty(IPropertyValuePair<TKey, TValue> item) { return properties.RemoveProperty(item); }
+        public IEnumerator<IPropertyValuePair<TKey, TValue>> GetEnumerator() { return properties.GetEnumerator(); }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); }
 
 

 

  ViewVC Help
Powered by ViewVC 1.1.22