public static NamedDataStream ToNamedDataStream(
            this XElement Elem, XNamespace Namespace)
        {
            NamedDataStream model = null;

            if (Elem != null)
            {
                model                 = new NamedDataStream();
                model.Name            = Elem.Element(Namespace + "Name").StringOrDefault("");
                model.DataStreamLines =
                    Elem.ToEnumerableOfString(Namespace, "DataStreamLines", "Item").ToList();
            }
            return(model);
        }
 public static XElement ToXElement(this NamedDataStream Model, XName Name)
 {
     if (Model == null)
     {
         return(new XElement(Name, null));
     }
     else
     {
         XElement xe = new XElement(Name,
                                    new XElement("Name", Model.Name),
                                    Model.DataStreamLines.ToXElement("DataStreamLines", "Item")
                                    );
         return(xe);
     }
 }