Beispiel #1
0
        /// <summary>
        /// Creates an instance of a HealthRecordInfo object using  the specified XML.
        /// </summary>
        /// <param name="navigator">The navigator.</param>
        /// <returns>HealthRecordInfo</returns>
        public static HealthRecordInfo CreateFromXml(XPathNavigator navigator)
        {
            Validator.ThrowIfArgumentNull(navigator, nameof(navigator), Resources.ParseXmlNavNull);

            HealthRecordInfo recordInfo = new HealthRecordInfo();

            recordInfo.ParseXml(navigator);
            return(recordInfo);
        }
Beispiel #2
0
        /// <summary>
        /// Creates an instance of a HealthRecordInfo object using
        /// the specified XML.
        /// </summary>
        ///
        /// <param name="connection">
        /// A connection for the current user.
        /// </param>
        ///
        /// <param name="navigator">
        /// The XML containing the record information.
        /// </param>
        ///
        /// <returns>
        /// A new instance of a HealthRecordInfo object populated with the
        /// record information.
        /// </returns>
        ///
        /// <exception cref="ArgumentNullException">
        /// The <paramref name="connection"/> or <paramref name="navigator"/>
        /// parameter is <b>null</b>.
        /// </exception>
        ///
        public static HealthRecordInfo CreateFromXml(
            IHealthVaultConnection connection,
            XPathNavigator navigator)
        {
            Validator.ThrowIfArgumentNull(connection, nameof(connection), Resources.PersonInfoConnectionNull);
            Validator.ThrowIfArgumentNull(navigator, nameof(navigator), Resources.ParseXmlNavNull);

            HealthRecordInfo recordInfo = new HealthRecordInfo();

            recordInfo.ParseXml(navigator);
            return(recordInfo);
        }