public void GetCommentIdForProperty_ReturnsCorrectXmlCommentId_ForGivenPropertyInfo( Type type, string propertyName, string expectedCommentId ) { var propertyInfo = type.GetProperty(propertyName); var commentId = XmlCommentsIdHelper.GetCommentIdForProperty(propertyInfo); Assert.Equal(expectedCommentId, commentId); }
private void ApplyPropertyComments(Schema propertySchema, PropertyInfo propertyInfo) { if (propertyInfo == null) { return; } var commentId = XmlCommentsIdHelper.GetCommentIdForProperty(propertyInfo); var propertyNode = _navigator.SelectSingleNode(string.Format(MemberXPath, commentId)); if (propertyNode == null) { return; } var propSummaryNode = propertyNode.SelectSingleNode(SummaryTag); if (propSummaryNode != null) { propertySchema.description = propSummaryNode.ExtractContent(); } }