/[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 100 by william, Sun Mar 10 10:34:07 2013 UTC revision 105 by william, Sun Mar 10 11:35:26 2013 UTC
# Line 44  namespace libxmltv.Interfaces Line 44  namespace libxmltv.Interfaces
44          PropertyDictionary MetaData { get; }          PropertyDictionary MetaData { get; }
45      }      }
46    
47        public interface IExtraMetaData
48        {
49        }
50        //public interface IExtraMetaData : IPro
51        //{
52        //}
53      public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }      public interface IXMLTVProgramCollection : IXMLTVDictionaryCollection<string, IXMLTVProgram> { }
54      public interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }      public interface IXMLTVChannelCollection : IXMLTVDictionaryCollection<string, IXMLTVChannel> { }
55      public interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }      public interface IXMLTVDictionaryCollection<TKey, TValue> { Dictionary<TKey, TValue> Collection { get; } }
# Line 103  namespace libxmltv.Interfaces Line 109  namespace libxmltv.Interfaces
109    
110  #region Property Dictionary support  #region Property Dictionary support
111      public interface IPropertyDictionary : IPropertyDictionary<string,object> { }      public interface IPropertyDictionary : IPropertyDictionary<string,object> { }
112      public interface IPropertyDictionary<TKey, TValue> : IPropertyCollection<PropertyValuePair<TKey, TValue>>, IEnumerable<PropertyValuePair<TKey, TValue>>, IEnumerable      public interface IPropertyDictionary<TKey, TValue> : IPropertyCollection<IPropertyValuePair<TKey, TValue>>, IEnumerable<IPropertyValuePair<TKey, TValue>>, IEnumerable
113      {      {
114          IPropertyCollection<TKey> PropertyKeys { get; }          IPropertyCollection<TKey> PropertyKeys { get; }
115          IPropertyCollection<TValue> PropertyValues { get; }                  IPropertyCollection<TValue> PropertyValues { get; }        
# Line 126  namespace libxmltv.Interfaces Line 132  namespace libxmltv.Interfaces
132  #endregion  #endregion
133  #region Property List support  #region Property List support
134      public interface IPropertyList : IPropertyList<string, object> { }      public interface IPropertyList : IPropertyList<string, object> { }
135      public interface IPropertyList<TKey, TValue> : IPropertyCollection<PropertyValuePair<TKey, TValue>>, IEnumerable<PropertyValuePair<TKey, TValue>>, IEnumerable      public interface IPropertyList<TKey, TValue> : IPropertyCollection<IPropertyValuePair<TKey, TValue>>, IEnumerable<IPropertyValuePair<TKey, TValue>>, IEnumerable
136      {      {
137          PropertyValuePair<TKey, TValue> this[int index] { get; set; }          IPropertyValuePair<TKey, TValue> this[int index] { get; set; }
138          IEnumerable<PropertyValuePair<TKey, TValue>> this[TKey name] { get; }//set; }          IEnumerable<IPropertyValuePair<TKey, TValue>> this[TKey name] { get; }//set; }
139    
140          int IndexOfProperty(PropertyValuePair<TKey, TValue> item);          int IndexOfProperty(IPropertyValuePair<TKey, TValue> item);
141          void InsertPropertyAtIndex(int index, PropertyValuePair<TKey, TValue> item);          void InsertPropertyAtIndex(int index, IPropertyValuePair<TKey, TValue> item);
142          void RemovePropertyAt(int index);          void RemovePropertyAt(int index);
143    
144          bool ContainsProperty(TKey name, TValue value);          bool ContainsProperty(TKey name, TValue value);
# Line 142  namespace libxmltv.Interfaces Line 148  namespace libxmltv.Interfaces
148  #endregion  #endregion
149    
150      #region PropertyValuePair support      #region PropertyValuePair support
151      public class PropertyValuePair : PropertyValuePair<string, object>  
152        public interface IPropertyValuePair : IPropertyValuePair<string,object>    {
153        }
154        public interface IPropertyValuePair<TKey, TValue>
155        {
156            TKey Name { get; }
157            TValue Value { get; }
158        }
159        internal class PropertyValuePair : PropertyValuePair<string, object>, IPropertyValuePair
160      {      {
161          public PropertyValuePair() :base() { }          public PropertyValuePair() :base() { }
162          public PropertyValuePair(string name, object value) : base(name,value) { }          public PropertyValuePair(string name, object value) : base(name,value) { }
163      }      }
164      public class PropertyValuePair<TKey, TValue>      internal class PropertyValuePair<TKey, TValue> : IPropertyValuePair<TKey,TValue>
165      {      {
166          #region KeyValuePair support          #region KeyValuePair support
167          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); }        
168          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); }
169          #endregion          #endregion
170          public PropertyValuePair() : this(default(TKey),default(TValue)) { }          public PropertyValuePair() : this(default(TKey),default(TValue)) { }

Legend:
Removed from v.100  
changed lines
  Added in v.105

  ViewVC Help
Powered by ViewVC 1.1.22