0

I'm really new to DocFx and I'm unable to filter some specific classes in my project.

This is the docfx.json:

{
  "metadata": [
    {
      "src": [
        {
          "files": ["**.dll"],
          "src": "../X3_Models/bin/Release/net7.0"
        }
      ],
      "dest": "api",
      "includePrivateMembers": false,
      "disableGitFeatures": false,
      "disableDefaultFilter": false,
      "namespaceLayout": "flattened",
      "filter": "filterConfig.yml"
    }
  ],

And the filterConfig.yml:

apiRules:
- exclude:
  uidRegex: TaskNotifier

I'm using CommunityToolkit.Mvvm, and the toolkit generates two additional clases for every class inherited from [ObservableObject].

For example:

public class X3_Models.X3ProductModel

public class X3_Models.X3ProductModel.TaskNotifier
public class X3_Models.X3ProductModel.TaskNotifier<T>

I would like to avoid all classes that contain TaskNotifier in my documentation.

Thanks.

McNets
  • 10,352
  • 3
  • 32
  • 61

1 Answers1

0

I have been able to solve it by using the combination of type and uidRegex:

apiRules:
- include:
    type: Interface
- exclude:
    uidRegex: TaskNotifier
    type: Class

I wonder if there is a better solution.

McNets
  • 10,352
  • 3
  • 32
  • 61