Exclude System.ObsoleteAttribute
Hi,
I wanted to exclude members with [Obsolete] attribute.
Here is my filter config :
apiRules:
- exclude:
hasAttribute:
uid: System.ObsoleteAttribute
type: Member
It's not working, [Obsolete] methode are still in my Api Documentation.
I am missing something ?
Many thanks!
@ansyral according to http://dotnet.github.io/docfx/tutorial/howto_filter_out_unwanted_apis_attributes.html, should we use attributeRules instead of apiRules to filter out ObseloteAttribute?
attributeRules:
- exclude:
uidRegex: System\.ObsoleteAttribute$
type: Type
@hellosnow
apiRulesfilters API.attributeRulesfilters attribute.
I wanted to exclude members with [Obsolete] attribute.
So apiRules is correct.
@vwxyzh yes you're right, I misunderstood the requirement
@bouboup , I tested locally and cannot repro. Could you give us more info about how you added your filter config? Was it put in the metadata section? And How did your code use Obsolete attribute? Your filter config could only filter apis wrapped by [Obsolote], namely the one with no ctor arguments.
I was using [Obsolete] attribute with argument :
[Obsolete("Use PublicLiveCommentFactory instead.")]
If i use it with no ctor argument, it's work !
[Obsolete]
Many thanks for your help @ansyral ;)