Events won't show when private members display is enabled


This concerns Help File Builder creating an HTML Help File 1 (chm) from a C# assembly.

In my assembly I define a delegate at namespace scope like this:

public delegate void delPutMsg(string msg); // namespace scope

Then, in an internal class I use the delegate to define an event like this:

public event delPutMsg m_myevent;

I am using the VS2010 extension of Sandcastle Help File Builder to build a .chm help file.

If I disable private member visibility in the Visibility tab of the File Builder Project properties, then I get the correct results, with the event m_myevent correctly described. Also, when I click the API Filter button, the class tree is correctly built and displayed, with the event m_myevent showing.

If, on the other hand, I enable the display of private class members (and still leave the display of public members on), then the event m_myevent is not shown in the class tree display of the API Filter Window. What is shown there instead, is the internal private member "delegate m_myevent", internally created by the compiler when I declare my event. This private member can be see with Ildasm, so it's not incorrect that it now gets show in the class tree. What is not correct, imo, is that the corresponding event doesn't get displayed any longer - it sort of "gets shadowed" by its private field of the same name.

Now, the real trouble is, in the generated .chm file, both members appear, the private delegate AND the public event. This is also correct, and it wouldn't be bad at all, except for one thing: since I don't have access to this private delegate in my source code, I cannot create a summary for it and I get flagged with the bold red warning message "summary missing for private member xxx.m_myevent" (I do provide a summary for the public event, and that part works fine).

I would like to disable the display of the private delegate member and still leave the display of the public event on (the reader of my help file really doesn't need to be concerned with how an event is implemented under the hood), but the API filter (Visiblity property page) won't let me do that, since, as mentioned earlier, it won't display both the private delegate and the public event. If I try to disable the display of the private delegate, then neither the delegate nor the event will appear in the .chm output file.

I think this deserves a (possibly future) program fix. But maybe there is some workaround for this issue. Please let me know if one is known. And, no, deselecting <summary> in the "Missing Tags" property page is not what I mean by a workaround. Also, deselecting "Private Fields" in the Visibility property page won't work for me because I have lots of other private fields in my internal class that I do want to get displayed.

Antonio Gortan
Curitiba, PR
Closed Apr 19, 2013 at 8:04 PM by TomCornelius
This is the CodePlex site issue tracker. I suggest posting this under the Help File Builder issue tracker