protected override void WriteCourseStart(CourseView courseView, string courseName, int courseNumber, string[] classNames, bool isScore, int variationNumber, VariationInfo variationInfo)
{
xmlWriter.WriteStartElement("Course");
if (variationInfo != null) {
xmlWriter.WriteElementString("Name", variationInfo.CodeString);
xmlWriter.WriteElementString("CourseFamily", courseName);
}
else {
xmlWriter.WriteElementString("Name", courseName);
}
if (!isScore) {
xmlWriter.WriteElementString("Length", XmlConvert.ToString(Math.Round(courseView.MaxTotalLength / 100F) * 100F)); // round to nearest 100m
if (courseView.TotalClimb > 0)
xmlWriter.WriteElementString("Climb", XmlConvert.ToString(Math.Round(courseView.TotalClimb / 5, MidpointRounding.AwayFromZero) * 5.0)); // round to nearest 5m
}
}