示例#1
0
 internal void AddContent(AtomContent content)
 {
     _content.Add(content);
 }
示例#2
0
        private static void VisitContentElement(XmlReader reader, AtomEntry entry)
        {
            Uri uri;
            Uri.TryCreate(reader.GetAttribute("src"), UriKind.Absolute, out uri);
            var content = new AtomContent
                {
                    Type = reader.GetAttribute("type"),
                    Src = uri
                };

            entry.AddContent(content);

            if (reader.IsEmptyElement)
                return;

            while (reader.Read())
            {
                if (reader.Name.Equals("content") && reader.NodeType == XmlNodeType.EndElement)
                    break;

                if (reader.NodeType == XmlNodeType.Text)
                    entry.Content.Value = reader.Value;
            }
        }