internal override XElement CreateXml() { var xRoot = new XElement(XmlConstants.Brick); xRoot.SetAttributeValue(XmlConstants.Type, XmlConstants.XmlGlideToBrickType); var xElementY = YDestination.CreateXml(); xElementY.SetAttributeValue(XmlConstants.Category, XmlConstants.YDestination); var xElementX = XDestination.CreateXml(); xElementX.SetAttributeValue(XmlConstants.Category, XmlConstants.XDestination); var xElementDuration = DurationInSeconds.CreateXml(); xElementDuration.SetAttributeValue(XmlConstants.Category, XmlConstants.DurationInSeconds); var xFormulalist = new XElement(XmlConstants.FormulaList); xFormulalist.Add(xElementY); xFormulalist.Add(xElementX); xFormulalist.Add(xElementDuration); xRoot.Add(xFormulalist); return(xRoot); }
internal override XElement CreateXml() { var xRoot = new XElement("brick"); xRoot.SetAttributeValue("type", "legoNxtPlayToneBrick"); var xVariable1 = new XElement("durationInSeconds"); xVariable1.Add(DurationInSeconds.CreateXml()); xRoot.Add(xVariable1); var xVariable2 = new XElement("frequency"); xVariable2.Add(Frequency.CreateXml()); xRoot.Add(xVariable2); return(xRoot); }