/[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/09 14:33:18	87
+++ trunk/libxmltv/Interfaces/Interfaces.cs	2013/03/09 17:42:34	90
@@ -6,6 +6,7 @@
 using System.Xml.Linq;
 using libxmltv.Core;
 using System.ComponentModel;
+using System.Collections;
 
 namespace libxmltv.Interfaces
 {
@@ -37,19 +38,19 @@
         string ToString();
     }
 
-    public interface IPropertyDictionary : IPropertyDictionary<string, object>    {    }
-    public interface IPropertyDictionary<TKey,TValue>
-    {
-        Dictionary<TKey, TValue> Properties { get; }
-        TValue GetProperty(TKey propertyname);
-        void SetProperty(TKey propertyname, TValue propertyvalue);
-        bool ContainsProperty(string propertyname);
-
-        void AddProperty(TKey propertyname);
-        void AddProperty(TKey propertyname, TValue propertyvalue);
-        void RemoveProperty(string propertyname);
-    }
-    public interface IXMLTVProgram : IPropertyDictionary
+    //public interface IPropertyDictionary : IPropertyDictionary<string, object>    {    }
+    //public interface IPropertyDictionary<TKey,TValue>
+    //{
+    //    Dictionary<TKey, TValue> Properties { get; }
+    //    TValue GetProperty(TKey propertyname);
+    //    void SetProperty(TKey propertyname, TValue propertyvalue);
+    //    bool ContainsProperty(string propertyname);
+
+    //    void AddProperty(TKey propertyname);
+    //    void AddProperty(TKey propertyname, TValue propertyvalue);
+    //    void RemoveProperty(string propertyname);
+    //}
+    public interface IXMLTVProgram
     {
         //int Id { get; }
         //DateTime Start { get; }
@@ -59,7 +60,7 @@
         //string SubTitle { get; }
         //string Description { get; }
         //string ToString();
-        
+        PropertyDictionary Properties { get; }
     }
 
     public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
@@ -117,4 +118,29 @@
     public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
     public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
     public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
+
+
+#region prop
+    public interface IPropertyDictionary : IPropertyDictionary<string,object> { }
+    public interface IPropertyDictionary<TKey, TValue> : IPropertyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
+    {
+        IPropertyCollection<TKey> PropertyKeys { get; }
+        IPropertyCollection<TValue> PropertyValues { get; }        
+        TValue this[TKey key] { get; set; }                
+        void AddProperty(TKey key, TValue value);        
+        bool ContainsProperty(TKey key);        
+        bool RemoveProperty(TKey key);        
+        bool TryGetPropertyValue(TKey key, out TValue value);
+    }
+    public interface IPropertyCollection<T> : IEnumerable<T>, IEnumerable
+    {
+        int PropertyCount { get; }
+        bool IsReadOnly { get; }
+        void AddProperty(T item);
+        void ClearProperties();
+        bool ContainsProperty(T item);
+        void CopyPropertiesTo(T[] array, int arrayIndex);
+        bool RemoveProperty(T item);
+    }
+#endregion
 }
\ No newline at end of file

 

  ViewVC Help
Powered by ViewVC 1.1.22