示例#1
0
        /// <summary>
        /// Converts the instance data into XML
        /// Used for transmitting across net
        /// </summary>
        public XElement ToXml()
        {
            //create root tag to hold data
            var compatibilityReport = new XElement("CompatibilityReport");

            //place data in individual tags
            var kutaScore      = new XElement("KutaScore", this.KutaScore);
            var male           = new XElement("Male", Male.ToXml());
            var female         = new XElement("Female", Female.ToXml());
            var predictionList = PredictionListToXml(this.PredictionList);

            //add in the data
            compatibilityReport.Add(kutaScore, male, female, predictionList);

            return(compatibilityReport);
        }