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

--- trunk/libxmltv/Core/PropertyList.cs	2013/03/10 11:35:26	105
+++ trunk/libxmltv/Core/PropertyList.cs	2013/03/10 17:41:52	118
@@ -6,13 +6,15 @@
 
 namespace libxmltv.Core
 {
-    public class PropertyList : PropertyList<string, object>, IPropertyList 
+    [Serializable]
+    internal class PropertyList : PropertyList<string, object>, IPropertyList 
     {
         public PropertyList() :base() { }
         public PropertyList(IEnumerable<IPropertyValuePair<string, object>> collection) : base(collection) { }
         public PropertyList(int capacity) : base(capacity) { }
     }
-    public class PropertyList<TKey, TValue> : IPropertyList<TKey, TValue>
+    [Serializable]
+    internal class PropertyList<TKey, TValue> : IPropertyList<TKey, TValue>
     {
         private PropertyCollection<IPropertyValuePair<TKey, TValue>> properties;
         public PropertyList() { properties = new PropertyCollection<IPropertyValuePair<TKey, TValue>>(); }
@@ -42,7 +44,7 @@
         {
             get
             {
-                IPropertyCollection<PropertyValuePair<TKey, TValue>> collection = (properties as IPropertyCollection<PropertyValuePair<TKey, TValue>>);
+                IPropertyCollection<IPropertyValuePair<TKey, TValue>> collection = (properties as IPropertyCollection<IPropertyValuePair<TKey, TValue>>);
                 if(collection == null)
                 {
                     throw new InvalidCastException(string.Format("Unable to cast: '{0}' to '{1}'", properties.GetType().Name, typeof(IPropertyCollection<PropertyValuePair<TKey, TValue>>).Name));
@@ -62,5 +64,10 @@
         public bool ContainsProperty(TKey name, TValue value) { return ContainsProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
         public void AddProperty(TKey name, TValue value) { AddProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
         public void RemoveProperty(TKey name, TValue value) { RemoveProperty(new PropertyValuePair<TKey, TValue>(name, value)); }
+
+        public override string ToString()
+        {
+            return string.Format("Property Count: {0}", PropertyCount);
+        }
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22