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) { var commentId = XmlCommentsIdHelper.GetCommentIdForProperty(propertyInfo); var propertyNode = _xmlNavigator.SelectSingleNode(string.Format(MemberXPath, commentId)); if (propertyNode == null) { return; } var summaryNode = propertyNode.SelectSingleNode(SummaryTag); if (summaryNode != null) { propertySchema.Description = summaryNode.ExtractContent(); } }