/// <summary> /// Populates this <see cref="GroupMembershipActivity"/> instance from the data in the XML. /// </summary> /// /// <param name="typeSpecificXml"> /// The XML to get the group membership activity data from. /// </param> /// /// <exception cref="InvalidOperationException"> /// If the first node in <paramref name="typeSpecificXml"/> is not /// a group-membership-activity node. /// </exception> /// protected override void ParseXml(IXPathNavigable typeSpecificXml) { XPathNavigator itemNav = typeSpecificXml.CreateNavigator().SelectSingleNode("group-membership-activity"); Validator.ThrowInvalidIfNull(itemNav, Resources.GroupMembershipActivityUnexpectedNode); _when = new HealthServiceDateTime(); _when.ParseXml(itemNav.SelectSingleNode("when")); _activity = new CodedValue(); _activity.ParseXml(itemNav.SelectSingleNode("activity")); _activityInfo = XPathHelper.GetOptNavValue(itemNav, "activity-info"); }
/// <summary> /// Creates a new instance of the <see cref="GroupMembershipActivity"/> class with the /// specified date/time and activity. /// </summary> /// /// <param name="when"> /// The date/time when the activity occurred. /// </param> /// /// <param name="activity"> /// The activity that occurred. /// </param> /// /// <exception cref="ArgumentNullException"> /// If <paramref name="when"/> or <paramref name="activity"/> parameter is <b>null</b>. /// </exception> /// public GroupMembershipActivity(HealthServiceDateTime when, CodedValue activity) : base(TypeId) { When = when; Activity = activity; }
/// <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; }