/[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 95 by william, Sun Mar 10 09:01:33 2013 UTC revision 97 by william, Sun Mar 10 09:43:49 2013 UTC
# Line 33  namespace libxmltv.Interfaces Line 33  namespace libxmltv.Interfaces
33      public interface IXMLTVChannel      public interface IXMLTVChannel
34      {      {
35          string Id { get; }          string Id { get; }
36          int Number { get; }          //int Number { get; }
37          string CallSign { get; }          //string CallSign { get; }
38          string Name { get; }          //string Name { get; }    
39            PropertyList MetaData { get; }
40          string ToString();          string ToString();
41      }      }
42      public interface IXMLTVProgram      public interface IXMLTVProgram
# Line 124  namespace libxmltv.Interfaces Line 125  namespace libxmltv.Interfaces
125      }      }
126  #endregion  #endregion
127  #region Property List support  #region Property List support
128      public interface IPropertyList : IPropertyList<PropertyValuePair<string, object>> { }      public interface IPropertyList : IPropertyList<string, object> { }
129      public interface IPropertyList<T> : IPropertyCollection<T>, IEnumerable<T>, IEnumerable      public interface IPropertyList<TKey, TValue> : IPropertyCollection<PropertyValuePair<TKey, TValue>>, IEnumerable<PropertyValuePair<TKey, TValue>>, IEnumerable
130      {      {
131          T this[int index] { get; set; }          PropertyValuePair<TKey, TValue> this[int index] { get; set; }
132          int IndexOfProperty(T item);          int IndexOfProperty(PropertyValuePair<TKey, TValue> item);
133          void InsertPropertyAtIndex(int index, T item);          void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item);
134          void RemovePropertyAt(int index);          void RemovePropertyAt(int index);
135    
136            bool ContainsProperty(TKey name, TValue value);
137            void AddProperty(TKey name, TValue value);
138            void RemoveProperty(TKey TKey, TValue value);
139      }      }
140  #endregion  #endregion
141    
142      #region PropertyValuePair support      #region PropertyValuePair support
143      public struct PropertyValuePair<TKey, TValue>      public class PropertyValuePair : PropertyValuePair<string, object>
144        {
145            public PropertyValuePair() :base() { }
146            public PropertyValuePair(string name, object value) : base(name,value) { }
147        }
148        public class PropertyValuePair<TKey, TValue>
149      {      {
150          #region KeyValuePair support          #region KeyValuePair support
151          public static implicit operator PropertyValuePair<TKey, TValue>(KeyValuePair<TKey, TValue> i) { return new PropertyValuePair<TKey, TValue>(i.Key, i.Value); }          public static implicit operator PropertyValuePair<TKey, TValue>(KeyValuePair<TKey, TValue> i) { return new PropertyValuePair<TKey, TValue>(i.Key, i.Value); }
152          public static implicit operator KeyValuePair<TKey, TValue>(PropertyValuePair<TKey, TValue> i) { return new KeyValuePair<TKey, TValue>(i.Name, i.Value); }          public static implicit operator KeyValuePair<TKey, TValue>(PropertyValuePair<TKey, TValue> i) { return new KeyValuePair<TKey, TValue>(i.Name, i.Value); }
153          #endregion          #endregion
154            public PropertyValuePair() : this(default(TKey),default(TValue)) { }
155          public PropertyValuePair(TKey name, TValue value)          public PropertyValuePair(TKey name, TValue value)
156          {          {
157              this.name = name;              this.name = name;

Legend:
Removed from v.95  
changed lines
  Added in v.97

  ViewVC Help
Powered by ViewVC 1.1.22