Exemplo n.º 1
0
 public static XElement ToXElement(this NamedDataStreamList Model, XName Name)
 {
     if (Model == null)
     {
         return(new XElement(Name));
     }
     else
     {
         return(new XElement(Name,
                             from c in Model
                             select c.ToXElement("NamedDataStream")
                             ));
     }
 }
Exemplo n.º 2
0
        public static NamedDataStreamList ToNamedDataStreamList(
            this XElement Elem, XNamespace Namespace)
        {
            if (Elem == null)
            {
                return(new NamedDataStreamList());
            }
            else
            {
                var sl = from c in Elem.Elements(Namespace + "NamedDataStream")
                         select c.ToNamedDataStream(Namespace);

                var recentList = new NamedDataStreamList();
                foreach (var sf in sl)
                {
                    recentList.Add(sf);
                }

                return(recentList);
            }
        }