/[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 09:10:42	96
+++ trunk/libxmltv/Core/PropertyList.cs	2013/03/10 09:43:49	97
@@ -6,8 +6,13 @@
 
 namespace libxmltv.Core
 {
-    public class PropertyList : PropertyList<string, object>, IPropertyList { }
-    public class PropertyList<TKey, TValue> : IPropertyList<PropertyValuePair<TKey, TValue>>
+    public class PropertyList : PropertyList<string, object>, IPropertyList 
+    {
+        public PropertyList() :base() { }
+        public PropertyList(IEnumerable<PropertyValuePair<string, object>> collection) : base(collection) { }
+        public PropertyList(int capacity) : base(capacity) { }
+    }
+    public class PropertyList<TKey, TValue> : IPropertyList<TKey, TValue>
     {
         private List<PropertyValuePair<TKey, TValue>> properties;
         public PropertyList() { properties = new List<PropertyValuePair<TKey, TValue>>(); }
@@ -26,5 +31,10 @@
         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(); }
+
+
+        public bool ContainsProperty(TKey name, TValue value) { return ContainsProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
+        public void AddProperty(TKey name, TValue value) { AddProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
+        public void RemoveProperty(TKey name, TValue value) { RemoveProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22