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

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

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

revision 93 by william, Sun Mar 10 08:44:53 2013 UTC revision 95 by william, Sun Mar 10 09:01:33 2013 UTC
# Line 10  using System.Reflection; Line 10  using System.Reflection;
10    
11  namespace libxmltv.Core  namespace libxmltv.Core
12  {  {
13        
14      public class PropertyCollection<T> : IPropertyCollection<T>      public class PropertyCollection<T> : IPropertyCollection<T>
15      {      {
16          private List<T> items = new List<T>();          private List<T> items = new List<T>();
# Line 26  namespace libxmltv.Core Line 26  namespace libxmltv.Core
26          public IEnumerator<T> GetEnumerator() { return items.GetEnumerator(); }          public IEnumerator<T> GetEnumerator() { return items.GetEnumerator(); }
27          System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return items.GetEnumerator(); }          System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return items.GetEnumerator(); }
28      }      }
29      public class PropertyDictionary : PropertyDictionary<string, object>      public class PropertyDictionary : PropertyDictionary<string, object>, IPropertyDictionary
30      {      {
31          public PropertyDictionary() : base()          public PropertyDictionary() : base() { }
         {  
             ThrowHelper.ThrowNotSupportedException(ExceptionResource.NotSupported_ReadOnlyCollection);  
         }  
32          public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { }          public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { }
33          public PropertyDictionary(IEqualityComparer<string> comparer) : base(comparer) { }          public PropertyDictionary(IEqualityComparer<string> comparer) : base(comparer) { }
34          public PropertyDictionary(int capacity) :base(capacity) { }          public PropertyDictionary(int capacity) :base(capacity) { }
# Line 119  namespace libxmltv.Core Line 116  namespace libxmltv.Core
116          public bool RemoveProperty(TKey key) { return properties.Remove(key); }          public bool RemoveProperty(TKey key) { return properties.Remove(key); }
117          public bool TryGetPropertyValue(TKey key, out TValue value) { return properties.TryGetValue(key, out value); }          public bool TryGetPropertyValue(TKey key, out TValue value) { return properties.TryGetValue(key, out value); }
118          public int PropertyCount { get { return properties.Count; } }          public int PropertyCount { get { return properties.Count; } }
119          public bool IsReadOnly { get { return (properties as ICollection<TKey>).IsReadOnly; } }          public bool IsReadOnly { get { return (properties as IPropertyCollection<TKey>).IsReadOnly; } }
120          public void AddProperty(PropertyValuePair<TKey, TValue> item) { AddProperty(item.Name, item.Value); }          public void AddProperty(PropertyValuePair<TKey, TValue> item) { AddProperty(item.Name, item.Value); }
121          public void ClearProperties() { properties.Clear(); }          public void ClearProperties() { properties.Clear(); }
122          public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return ContainsProperty(item.Name); }          public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return ContainsProperty(item.Name); }

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

  ViewVC Help
Powered by ViewVC 1.1.22