/[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

--- trunk/libxmltv/Core/PropertyDictionary.cs	2013/03/10 08:21:30	92
+++ trunk/libxmltv/Core/PropertyDictionary.cs	2013/03/10 09:01:33	95
@@ -10,7 +10,7 @@
 
 namespace libxmltv.Core
 {
-
+    
     public class PropertyCollection<T> : IPropertyCollection<T>
     {
         private List<T> items = new List<T>();
@@ -26,7 +26,7 @@
         public IEnumerator<T> GetEnumerator() { return items.GetEnumerator(); }
         System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { return items.GetEnumerator(); }
     }
-    public class PropertyDictionary : PropertyDictionary<string, object> 
+    public class PropertyDictionary : PropertyDictionary<string, object>, IPropertyDictionary
     {
         public PropertyDictionary() : base() { }
         public PropertyDictionary(IPropertyDictionary dictionary) : base(dictionary) { }
@@ -116,7 +116,7 @@
         public bool RemoveProperty(TKey key) { return properties.Remove(key); }
         public bool TryGetPropertyValue(TKey key, out TValue value) { return properties.TryGetValue(key, out value); }
         public int PropertyCount { get { return properties.Count; } }
-        public bool IsReadOnly { get { return (properties as ICollection<TKey>).IsReadOnly; } }
+        public bool IsReadOnly { get { return (properties as IPropertyCollection<TKey>).IsReadOnly; } }
         public void AddProperty(PropertyValuePair<TKey, TValue> item) { AddProperty(item.Name, item.Value); }
         public void ClearProperties() { properties.Clear(); }
         public bool ContainsProperty(PropertyValuePair<TKey, TValue> item) { return ContainsProperty(item.Name); }
@@ -142,17 +142,19 @@
             public PropertyDictionaryEnumerator(PropertyDictionary<TKey, TValue> dictionary, int getEnumeratorRetType) 
             {
                 this.dictionary = dictionary;
+                this.version = dictionary.version;
+                this.index = 0;
                 this.getEnumeratorRetType = getEnumeratorRetType;
+                this.current = new PropertyValuePair<TKey, TValue>();
             }
 
             public PropertyValuePair<TKey, TValue> Current
             {
-                get { throw new NotImplementedException(); }
+                get { return this.current; }
             }
 
             public void Dispose()
             {
-                throw new NotImplementedException();
             }
 
             object IEnumerator.Current
@@ -190,10 +192,7 @@
                 this.index = this.dictionary.Count() + 1;
                 this.current = new PropertyValuePair<TKey, TValue>();
                 return false;
-
-
             }
-
             public void Reset()
             {
                 if (this.version != this.dictionary.version)

 

  ViewVC Help
Powered by ViewVC 1.1.22