/[xmltv_parser]/trunk/libxmltv/Core/PropertyList.cs
ViewVC logotype

Diff of /trunk/libxmltv/Core/PropertyList.cs

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

revision 96 by william, Sun Mar 10 09:01:33 2013 UTC revision 97 by william, Sun Mar 10 09:43:49 2013 UTC
# Line 6  using libxmltv.Interfaces; Line 6  using libxmltv.Interfaces;
6    
7  namespace libxmltv.Core  namespace libxmltv.Core
8  {  {
9      public class PropertyList : PropertyList<string, object>, IPropertyList { }      public class PropertyList : PropertyList<string, object>, IPropertyList
10      public class PropertyList<TKey, TValue> : IPropertyList<PropertyValuePair<TKey, TValue>>      {
11            public PropertyList() :base() { }
12            public PropertyList(IEnumerable<PropertyValuePair<string, object>> collection) : base(collection) { }
13            public PropertyList(int capacity) : base(capacity) { }
14        }
15        public class PropertyList<TKey, TValue> : IPropertyList<TKey, TValue>
16      {      {
17          private List<PropertyValuePair<TKey, TValue>> properties;          private List<PropertyValuePair<TKey, TValue>> properties;
18          public PropertyList() { properties = new List<PropertyValuePair<TKey, TValue>>(); }          public PropertyList() { properties = new List<PropertyValuePair<TKey, TValue>>(); }
# Line 26  namespace libxmltv.Core Line 31  namespace libxmltv.Core
31          public bool RemoveProperty(PropertyValuePair<TKey, TValue> item) { return properties.Remove(item); }          public bool RemoveProperty(PropertyValuePair<TKey, TValue> item) { return properties.Remove(item); }
32          public IEnumerator<PropertyValuePair<TKey, TValue>> GetEnumerator() { return properties.GetEnumerator(); }          public IEnumerator<PropertyValuePair<TKey, TValue>> GetEnumerator() { return properties.GetEnumerator(); }
33          System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); }          System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return this.GetEnumerator(); }
34    
35    
36            public bool ContainsProperty(TKey name, TValue value) { return ContainsProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
37            public void AddProperty(TKey name, TValue value) { AddProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
38            public void RemoveProperty(TKey name, TValue value) { RemoveProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
39      }      }
40  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.22