Exemple #1
0
        /// <summary>
        /// Format a data type into a string in a localisation namespace
        /// </summary>
        /// <param name="dataType">The data type to format</param>
        /// <param name="elementName">The name of the element</param>
        public static void SerialiseDataType(IGraphable dataType, XmlWriter xmlWriter, string elementName, string localNamespace)
        {
            if (dataType != null)
            {
                xmlWriter.WriteStartElement(elementName, localNamespace);
                Formatter fmtr = new Formatter();
                fmtr.GraphAides.Add(typeof(MARC.Everest.Formatters.XML.Datatypes.R1.Formatter));
                fmtr.GraphObject(xmlWriter, dataType);

                xmlWriter.WriteEndElement();
            }
        }