Exemple #1
0
        public static List<Note> GetList(Consumer consumer)
        {
            List<Note> ret = new List<Note>();
            string xml = consumer.Get(ResourceBase.BuildUrl("notes"));

            XmlDocument xdoc = new XmlDocument();
            xdoc.LoadXml(xml);

            XmlNamespaceManager nsmgr = new XmlNamespaceManager(xdoc.NameTable);
            nsmgr.AddNamespace("sn", "http://api.springnote.com");

            foreach (XmlNode node in xdoc.SelectNodes("/sn:notes/sn:note", nsmgr))
            {
                Note note = (Note)Deserialize(typeof(Note), node.OuterXml);
                note.consumer = consumer;
                ret.Add(note);
            }

            return ret;
        }
Exemple #2
0
 public Note(string noteName, Consumer consumer)
 {
     this.consumer = consumer;
     this.Identifier = noteName;
 }