/// <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); }
/// <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); }
/// <summary> /// Copy constructor /// </summary> /// /// <param name="recordInfo"> /// The record info object which is to be used as the source /// for the data. /// </param> /// internal HealthRecordInfo(HealthRecordInfo recordInfo) { Id = recordInfo.Id; _custodian = recordInfo.IsCustodian; _dateAuthorizationExpires = recordInfo.DateAuthorizationExpires; _name = recordInfo.Name; _relationshipType = recordInfo.RelationshipType; _relationshipName = recordInfo.RelationshipName; _displayName = recordInfo.DisplayName; if (recordInfo.Location != null) { Location = new Location(recordInfo.Location.Country, recordInfo.Location.StateProvince); } }