/[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

revision 87 by william, Sat Mar 9 14:33:18 2013 UTC revision 90 by william, Sat Mar 9 17:42:34 2013 UTC
# Line 6  using System.IO; Line 6  using System.IO;
6  using System.Xml.Linq;  using System.Xml.Linq;
7  using libxmltv.Core;  using libxmltv.Core;
8  using System.ComponentModel;  using System.ComponentModel;
9    using System.Collections;
10    
11  namespace libxmltv.Interfaces  namespace libxmltv.Interfaces
12  {  {
# Line 37  namespace libxmltv.Interfaces Line 38  namespace libxmltv.Interfaces
38          string ToString();          string ToString();
39      }      }
40    
41      public interface IPropertyDictionary : IPropertyDictionary<string, object>    {    }      //public interface IPropertyDictionary : IPropertyDictionary<string, object>    {    }
42      public interface IPropertyDictionary<TKey,TValue>      //public interface IPropertyDictionary<TKey,TValue>
43      {      //{
44          Dictionary<TKey, TValue> Properties { get; }      //    Dictionary<TKey, TValue> Properties { get; }
45          TValue GetProperty(TKey propertyname);      //    TValue GetProperty(TKey propertyname);
46          void SetProperty(TKey propertyname, TValue propertyvalue);      //    void SetProperty(TKey propertyname, TValue propertyvalue);
47          bool ContainsProperty(string propertyname);      //    bool ContainsProperty(string propertyname);
48    
49          void AddProperty(TKey propertyname);      //    void AddProperty(TKey propertyname);
50          void AddProperty(TKey propertyname, TValue propertyvalue);      //    void AddProperty(TKey propertyname, TValue propertyvalue);
51          void RemoveProperty(string propertyname);      //    void RemoveProperty(string propertyname);
52      }      //}
53      public interface IXMLTVProgram : IPropertyDictionary      public interface IXMLTVProgram
54      {      {
55          //int Id { get; }          //int Id { get; }
56          //DateTime Start { get; }          //DateTime Start { get; }
# Line 59  namespace libxmltv.Interfaces Line 60  namespace libxmltv.Interfaces
60          //string SubTitle { get; }          //string SubTitle { get; }
61          //string Description { get; }          //string Description { get; }
62          //string ToString();          //string ToString();
63                    PropertyDictionary Properties { get; }
64      }      }
65    
66      public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }      public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
# Line 117  namespace libxmltv.Interfaces Line 118  namespace libxmltv.Interfaces
118      public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }      public interface ISetCreatedInstanceEvent<T> where T : EventArgs { void SetOnInstanceCreated(EventHandler<T> event_instance);    }
119      public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }      public interface IRuntimeInstanceLoader : IRuntimeInstanceLoader<object> { }
120      public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }      public interface IRuntimeInstanceLoader<T> { T LoadFromInstance(T instance);    }
121    
122    
123    #region prop
124        public interface IPropertyDictionary : IPropertyDictionary<string,object> { }
125        public interface IPropertyDictionary<TKey, TValue> : IPropertyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
126        {
127            IPropertyCollection<TKey> PropertyKeys { get; }
128            IPropertyCollection<TValue> PropertyValues { get; }        
129            TValue this[TKey key] { get; set; }                
130            void AddProperty(TKey key, TValue value);        
131            bool ContainsProperty(TKey key);        
132            bool RemoveProperty(TKey key);        
133            bool TryGetPropertyValue(TKey key, out TValue value);
134        }
135        public interface IPropertyCollection<T> : IEnumerable<T>, IEnumerable
136        {
137            int PropertyCount { get; }
138            bool IsReadOnly { get; }
139            void AddProperty(T item);
140            void ClearProperties();
141            bool ContainsProperty(T item);
142            void CopyPropertiesTo(T[] array, int arrayIndex);
143            bool RemoveProperty(T item);
144        }
145    #endregion
146  }  }

Legend:
Removed from v.87  
changed lines
  Added in v.90

  ViewVC Help
Powered by ViewVC 1.1.22