Member documentation missing when lambda expressions used

Topics: User Forum
Jun 30, 2010 at 2:21 AM

I have a property where one of the statements is using a Lambda expression.  When SHFB 1.8.0.3 generates the API pages for this class, only the class summary is written.  The only information listed in the member, property or method pages are those items from the base class.  All members from this class are missing.

    /// <summary>
    /// The title of the best book to read.
    /// </summary>
    public string Best {
      get {
        IEnumerable<string> books = GetBooks();

        // This lamdba expression causes no class member information
        // to be generated using SHFB 1.8.0.3
        return (books.Where(x => x=="best").FirstOrDefault());
      }
    }

If the property is implemented using a delegate, the members of this class are written.

    /// <summary>
    /// The title of the best book to read.
    /// </summary>
    public string Best {
      get {
        IEnumerable<string> books = GetBooks();
        
        // The use of a delegate allows SHFB 1.8.0.3 to generate the members.
        return (books.Where(IsBest).FirstOrDefault());
      }
    }

    private bool IsBest(string book) {
      return (book == "best");
    }


I'm have no idea why the property implementation affects documentation generation, and I'm not sure if this is a Sandcastle issue, or a SHFB issue.

Any help would be appreciated and thanks!

 

Jun 30, 2010 at 2:20 PM

It looks like this may be a Sandcastle issue that is fixed by the June 2010 release.  A discussion (http://sandcastle.codeplex.com/Thread/View.aspx?ThreadId=217726) on the Sandcasle site is experiencing my same issue.  I'll just have to wait for SHFB 1.9 to see if it's fixed.