Problem with generics

Nov 24, 2010 at 7:47 AM
Edited Nov 24, 2010 at 7:48 AM

Hi,

I have the following code:

        /// <summary>
        /// Creates a <see cref="Member"/> using a property, field o non-void expression call.
        /// </summary>
        /// <param name="member">
        /// The member expression to use as a member.
        /// </param>
        /// <returns>A <see cref="Member"/> for the specified member expression.</returns>
        public static Member Of(Expression<Func<object>> member)
        {
            return member.AsMemberOrMethod();
        }
And the generated documentation XML is:
        <member name="M:Utilities.CodeManagement.Member.Of(System.Linq.Expressions.Expression{System.Func{System.Object}})">
            <summary>
            Create a <see cref="T:Utilities.CodeManagement.Member"/> using a property, field o non-void expression call.
            </summary>
            <param name="member">The member expression to use as a member.</param>
            <returns>A <see cref="T:Utilities.CodeManagement.Member"/> for the specified member expression.</returns>
        </member>
 
But although everything seems to be correct, the documentation of the previous method does not appear in the help output.

Any ideas?

Jan 7, 2011 at 8:20 AM

The missing what appears in generated help is:

[Missing <summary> documentation for "M:Utilities.CodeManagement.Member.of(System.Linq.Expressions.Expression{System.Func`1})"]

Jan 7, 2011 at 10:18 AM

Another simple example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TestSandcastle
{
    public class Class1
    {
        /// <summary>
        /// Text that is lost in sandcasle.
        /// </summary>
        /// <param name="param">Text that is lost in sandcasle</param>
        public void Test(Func<double> param)
        {

        }
    }
}

xml:

<!--l version="1.0-->
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>TestSandcastle</name>
    </assembly>
    <members>
        <member name="M:TestSandcastle.Class1.Test(System.Func{System.Double})">
            <summary>
            Text that is lost in sandcasle.
            </summary>
            <param name="param">Text that is lost in sandcasle</param>
        </member>
    </members>
</doc>

 

We get warnings:

[Missing <summary> documentation for "M:TestSandcastle.Class1.Test(System.Func`1)"]
[Missing <param name="param"/> documentation for "M:TestSandcastle.Class1.Test(System.Func`1)"]
Jan 7, 2011 at 12:53 PM

I also had a similar problem when testing my library recently.
The generic support is not completely working as expected, and must be investigated. 

Please keep reporting the cases that went wrong.

Best regards,
Paul. 

Jan 17, 2011 at 8:06 PM

I just reported one here:

http://social.msdn.microsoft.com/Forums/en-US/devdocs/thread/b95a7e22-4512-4441-a120-2b9031cc8ae6

       -Steve