[blam] Remove workaround for the XML storage



commit 7256a59dd128d2dc3753051538f475d0ec321e7f
Author: Carlos MartÃn Nieto <carlos cmartin tk>
Date:   Thu Aug 25 21:03:27 2011 +0200

    Remove workaround for the XML storage
    
    There is no more need for the "blam" namespace, as it was a workaround
    to store our fields in the item store, which was a feed.
    
    Signed-off-by: Carlos MartÃn Nieto <carlos cmartin tk>

 src/Item.cs |   38 --------------------------------------
 1 files changed, 0 insertions(+), 38 deletions(-)
---
diff --git a/src/Item.cs b/src/Item.cs
index 8d201cf..f96dcde 100644
--- a/src/Item.cs
+++ b/src/Item.cs
@@ -38,16 +38,6 @@ namespace Imendio.Blam {
 			}
 		}
 
-        public void WriteExtensions()
-        {
-            ElementExtensions.Clear();
-            ElementExtensions.Add("unread", "blam", Unread);
-            ElementExtensions.Add("old", "blam", Old);
-            ElementExtensions.Add("permanent", "blam", Permanent);
-            ElementExtensions.Add("keywords", "blam", keywords);
-            ElementExtensions.Add("refcount", "blam", ref_cnt);
-        }
-
         public int RefCount {
             get {
                 return ref_cnt;
@@ -80,38 +70,10 @@ namespace Imendio.Blam {
             /* Newlines aren't allowed in titles */
             this.Title = new TextSyndicationContent(HtmlUtils.CollapseWhitespace(item.Title.Text));
 
-            if(item.Content != null){
-                /* The feed formatters only store the summary */
-                this.Summary = item.Content as TextSyndicationContent;
-            }
-
             foreach(SyndicationElementExtension ext in item.ElementExtensions){
                 if(ext.OuterName == "encoded"){
                     this.Summary = new TextSyndicationContent(ext.GetObject<string>());
                 }
-
-                switch(ext.OuterNamespace){
-                   /* Read our Item properties */
-                    case "blam":
-                        switch(ext.OuterName){
-                    case "unread":
-                        Unread = ext.GetObject<bool>();
-                        break;
-                    case "old":
-                        Old = ext.GetObject<bool>();
-                        break;
-                    case "permanent":
-                        Permanent = ext.GetObject<bool>();
-                        break;
-                    case "keywords":
-                        Keywords = ext.GetObject<string>();
-                        break;
-                    case "refcount":
-                        ref_cnt = ext.GetObject<int>();
-                        break;
-                    }
-                    break;
-                }
             }
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]