CatEye.StageOperationParameters.SerializeToXML C# (CSharp) Méthode

SerializeToXML() public méthode

Serializes object to XML node. Should be overridden in children. Base function should be called in every child and the child data should be appended to it's result.
public SerializeToXML ( XmlDocument xdoc ) : XmlNode
xdoc System.Xml.XmlDocument /// Target XML document. ///
Résultat System.Xml.XmlNode
        public virtual XmlNode SerializeToXML(XmlDocument xdoc)
        {
            XmlNode res = xdoc.CreateElement("StageOperationParameters");
            string ID = GetStageOperationID();
            if (ID == null)
            {
                throw new MissingStageOperationIDException("Can't serialize the object. It's class (" + GetType().Name + ") has no StageOperationID attribute");
            }

            res.Attributes.Append(xdoc.CreateAttribute("ID")).Value = ID;
            res.Attributes.Append(xdoc.CreateAttribute("Active")).Value = mActive.ToString();

            return res;
        }