public static XElement CreateXmlNode(XNamespace Ns, MarkerRef T) { XElement el = new XElement(Constants.MARKER_REF); if (!String.IsNullOrEmpty(T.Marker_Id.ToString())) { el.Add(new XAttribute(Constants.MARKER_ID, T.Marker_Id)); } return(el); }
public static XElement CreateXmlNode(XNamespace Ns, MarkerRefs R) { XElement el = new XElement(Constants.MARKER_REFS); foreach (MarkerRef item in R.MarkerRefsList) { el.Add(MarkerRef.CreateXmlNode(Ns, item)); } return(el); }
public static MarkerRef ParseXmlNode(XElement Node) { MarkerRef marker = new MarkerRef(); IEnumerable <XAttribute> attrCol = Node.Attributes(); foreach (XAttribute item in attrCol) { switch (item.Name.LocalName) { case Constants.MARKER_ID: marker.Marker_Id = item.Value; break; default: break; } } return(marker); }
public static MarkerRefs ParseXmlNode(XElement Node) { MarkerRefs marker = new MarkerRefs(); IEnumerable <XElement> nodeliste = Node.Elements(); foreach (XElement item in nodeliste) { switch (item.Name.LocalName) { case Constants.MARKER_REF: marker.AddMarkRef(MarkerRef.ParseXmlNode(item)); break; default: break; } } return(marker); }
public void RemoveMarkRef(MarkerRef Ref) { MarkerRefsList.Remove(Ref); }
public void AddMarkRef(MarkerRef Ref) { MarkerRefsList.Add(Ref); }