/// <summary>
        /// Populates this <see cref="GeneralMeasurement"/> instance from the data in the XML.
        /// </summary>
        ///
        /// <param name="navigator">
        /// The XML to get the general measurement data from.
        /// </param>
        ///
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="navigator"/> is <b>null</b>.
        /// </exception>
        ///
        public override void ParseXml(XPathNavigator navigator)
        {
            Validator.ThrowIfNavigatorNull(navigator);

            // display
            _display = navigator.SelectSingleNode("display").Value;

            // structured
            XPathNodeIterator structuredIterator = navigator.Select("structured");

            _structured = new Collection <StructuredMeasurement>();
            foreach (XPathNavigator structuredNav in structuredIterator)
            {
                StructuredMeasurement structuredMeasurement = new StructuredMeasurement();
                structuredMeasurement.ParseXml(structuredNav);
                _structured.Add(structuredMeasurement);
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="ExerciseDetail"/> class
 /// with specified values
 /// </summary>
 /// <param name="name">The name of the information stored in this exercise detail. </param>
 /// <param name="value">The value of the exercise detail</param>
 ///
 /// <exception cref="ArgumentNullException">
 /// The <paramref name="name"/> or <paramref name="value"/> is <b>null</b>.
 /// </exception>
 public ExerciseDetail(CodedValue name, StructuredMeasurement value)
 {
     Name  = name;
     Value = value;
 }