public Member(AtomPubCollection collection) { this.collection = collection; }
public static IMember FromEntry(AtomPubCollection collection, XmlDocument doc) { Member mb = new Member(collection); mb.Entry = new AtomEntry(); mb.Entry.Document = doc; XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable); nsmgr.AddNamespace("atom", "http://www.w3.org/2005/Atom"); mb.MemberId = mb.GenerateResourceId(mb.Entry); mb.MediaType = "application/atom+xml;type=entry"; mb.MediaId = (string)mb.Collection.ConvertId(mb.MemberId)[1]; XmlNode link = doc.SelectSingleNode("./atom:link[@rel='edit-media']", nsmgr); if (link != null) { string type = ((XmlElement)link).GetAttribute("type"); if (type != String.Empty) { mb.MediaType = type; } } return mb; }