/[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 92 by william, Sun Mar 10 08:21:30 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() { }
32          public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { }          public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { }
# Line 116  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); }
# Line 142  namespace libxmltv.Core Line 142  namespace libxmltv.Core
142              public PropertyDictionaryEnumerator(PropertyDictionary<TKey, TValue> dictionary, int getEnumeratorRetType)              public PropertyDictionaryEnumerator(PropertyDictionary<TKey, TValue> dictionary, int getEnumeratorRetType)
143              {              {
144                  this.dictionary = dictionary;                  this.dictionary = dictionary;
145                    this.version = dictionary.version;
146                    this.index = 0;
147                  this.getEnumeratorRetType = getEnumeratorRetType;                  this.getEnumeratorRetType = getEnumeratorRetType;
148                    this.current = new PropertyValuePair<TKey, TValue>();
149              }              }
150    
151              public PropertyValuePair<TKey, TValue> Current              public PropertyValuePair<TKey, TValue> Current
152              {              {
153                  get { throw new NotImplementedException(); }                  get { return this.current; }
154              }              }
155    
156              public void Dispose()              public void Dispose()
157              {              {
                 throw new NotImplementedException();  
158              }              }
159    
160              object IEnumerator.Current              object IEnumerator.Current
# Line 190  namespace libxmltv.Core Line 192  namespace libxmltv.Core
192                  this.index = this.dictionary.Count() + 1;                  this.index = this.dictionary.Count() + 1;
193                  this.current = new PropertyValuePair<TKey, TValue>();                  this.current = new PropertyValuePair<TKey, TValue>();
194                  return false;                  return false;
   
   
195              }              }
   
196              public void Reset()              public void Reset()
197              {              {
198                  if (this.version != this.dictionary.version)                  if (this.version != this.dictionary.version)

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

  ViewVC Help
Powered by ViewVC 1.1.22