/[xmltv_parser]/trunk/libxmltv/Interfaces/Interfaces.cs
ViewVC logotype

Diff of /trunk/libxmltv/Interfaces/Interfaces.cs

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

--- trunk/libxmltv/Interfaces/Interfaces.cs	2013/03/10 09:01:33	95
+++ trunk/libxmltv/Interfaces/Interfaces.cs	2013/03/10 09:43:49	97
@@ -33,9 +33,10 @@
     public interface IXMLTVChannel
     {
         string Id { get; }
-        int Number { get; }
-        string CallSign { get; }
-        string Name { get; }
+        //int Number { get; }
+        //string CallSign { get; }
+        //string Name { get; }    
+        PropertyList MetaData { get; }
         string ToString();
     }
     public interface IXMLTVProgram
@@ -124,23 +125,33 @@
     }
 #endregion
 #region Property List support
-    public interface IPropertyList : IPropertyList<PropertyValuePair<string, object>> { }
-    public interface IPropertyList<T> : IPropertyCollection<T>, IEnumerable<T>, IEnumerable
+    public interface IPropertyList : IPropertyList<string, object> { }
+    public interface IPropertyList<TKey, TValue> : IPropertyCollection<PropertyValuePair<TKey, TValue>>, IEnumerable<PropertyValuePair<TKey, TValue>>, IEnumerable
     {
-        T this[int index] { get; set; }
-        int IndexOfProperty(T item);
-        void InsertPropertyAtIndex(int index, T item);
+        PropertyValuePair<TKey, TValue> this[int index] { get; set; }
+        int IndexOfProperty(PropertyValuePair<TKey, TValue> item);
+        void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item);
         void RemovePropertyAt(int index);
+
+        bool ContainsProperty(TKey name, TValue value);
+        void AddProperty(TKey name, TValue value);
+        void RemoveProperty(TKey TKey, TValue value);
     }
 #endregion
 
     #region PropertyValuePair support
-    public struct PropertyValuePair<TKey, TValue>
+    public class PropertyValuePair : PropertyValuePair<string, object>
+    {
+        public PropertyValuePair() :base() { }
+        public PropertyValuePair(string name, object value) : base(name,value) { }
+    }
+    public class PropertyValuePair<TKey, TValue>
     {
         #region KeyValuePair support
         public static implicit operator PropertyValuePair<TKey, TValue>(KeyValuePair<TKey, TValue> i) { return new PropertyValuePair<TKey, TValue>(i.Key, i.Value); }
         public static implicit operator KeyValuePair<TKey, TValue>(PropertyValuePair<TKey, TValue> i) { return new KeyValuePair<TKey, TValue>(i.Name, i.Value); }
         #endregion
+        public PropertyValuePair() : this(default(TKey),default(TValue)) { }
         public PropertyValuePair(TKey name, TValue value)
         {
             this.name = name;

 

  ViewVC Help
Powered by ViewVC 1.1.22