This project has moved. For the latest updates, please go here.

Problem with APIFilter

Nov 4, 2007 at 2:18 PM
I have an odd class hierarcy that look like this
namespace ns {
public class Class1 {
/// <exclude/>
class Class2 {
const int xx = yy;

public class Class2 {

It looks fine in the Api filter dialog where Class1.Class2 is excluded but the generated apifilter looks like
<namespace name="ns" expose="true">
<type name="class2" expose="false"/>

which removes the ns.Class2 class.

Can I somehow supply my own apifilter file via shfb.

Nov 4, 2007 at 8:19 PM
This appears to be a bug in the way the MRefBuilder API filter is implemented. In order to exclude a class, you have to specify it's name alone in the <type>element. If it's a nested class, the parent class's name isn't taken into account. As such, a nested class that is excluded will cause a non-nested class of the same name to also get excluded. I'll report this as a bug. In the meantime, in your example the inner class is private. As such, unless you are doing a build that includes private members, you can remove the <exclude/> tag and the non-nested class will appear in the documentation. The nested class will be omitted by default if the DocumentPrivates option is set to false.