Ejemplo n.º 1
0
        public void Write(XmlWriter xmlWriter)
        {
            if (null == xmlWriter)
            {
                throw new ArgumentNullException(nameof(xmlWriter));
            }

            xmlWriter.WriteStartElement("diagram");

            xmlWriter.WriteAttributeString("title", Title);
            xmlWriter.WriteAttributeString("strings", NumStrings.ToString());
            xmlWriter.WriteAttributeString("frets", NumFrets.ToString());

            foreach (DiagramMark mark in Marks)
            {
                mark.Write(xmlWriter);
            }

            foreach (DiagramBarre barre in Barres)
            {
                barre.Write(xmlWriter);
            }

            foreach (DiagramFretLabel fretLabel in FretLabels)
            {
                fretLabel.Write(xmlWriter);
            }

            Style.Write(xmlWriter);

            xmlWriter.WriteEndElement();
        }
Ejemplo n.º 2
0
        public void Write(XmlWriter xmlWriter)
        {
            if (null == xmlWriter)
            {
                throw new ArgumentNullException(nameof(xmlWriter));
            }

            xmlWriter.WriteStartElement("instrument");

            xmlWriter.WriteAttributeString("name", Name);
            xmlWriter.WriteAttributeString("strings", NumStrings.ToString());

            foreach (Tuning t in _tunings)
            {
                t.Write(xmlWriter);
            }

            xmlWriter.WriteEndElement();
        }