Repository navigation
Closed
Labels
area-Extensions-FileSystemdocumentationDocumentation bug or enhancement, does not impact product or test codehelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged
Milestone
Description
Area owners: @maryamariyan @carlossanlop @jozkee
The APIs in the list below are missing some or all of their documentation. Please add the missing documentation directly in triple slash comments in source. We will make sure it gets ported to dotnet-api-docs after it's merged.
Make sure to follow the documentation guidelines defined in the dotnet-api-docs wiki:
https://github.com/dotnet/dotnet-api-docs/wiki
Also please add me as a PR reviewer.
Community contributions are welcome.
Microsoft.Extensions.FileProviders
Notes:
- The namespaces need to be documented directly in dotnet-api-docs.
- Some of the APIs are obsolete, so I'll let area owners decide if they want to still document them or skip them. If you opt for documenting them, please do it directly in dotnet-api-docs.
Reacted by Copilot
Metadata
Metadata
Labels
area-Extensions-FileSystemdocumentationDocumentation bug or enhancement, does not impact product or test codehelp wanted[up-for-grabs] Good issue for external contributorsin-prThere is an active PR which will close this issue when it is merged
Activity
TheMaximum commentedon Feb 21, 2021
I'm looking to add comments to the mentioned constructors, however at the moment they do not exist. I added them in https://github.com/TheMaximum/runtime/commit/f8fa633ef397f95a8f8bcd4ed62f47a6cead87c4, however I've got a few questions about it.
In my commit, I've created a private constructor for
NotFoundDirectoryContents, as it is used as a Singleton. I couldn't find places where it is constructed except for theSingletonproperty in the class itself. Is this the right course of action, or should the class be allowed to be constructed elsewhere (bypassing the singleton), @maryamariyan?runtime/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/src/NotFoundDirectoryContents.cs
Lines 10 to 18 in a350bc6
Adding the constructor for
NullFileProviderseems pretty straight-forward (?).FileSystemInfoHelperis a static class and as such cannot have instance constructors, could you indicate why it shows up in the documentation and how to proceed, @carlossanlop?KalleOlaviNiemitalo commentedon Feb 21, 2021
The FileSystemInfoHelper doc page says it applies only to ".NET Platform Extensions 1.0, 1.1". The class is public and not static in the following, which I think is the 1.1 source code: https://github.com/aspnet/FileSystem/blob/rel/1.1.0/src/Microsoft.Extensions.FileProviders.Physical/FileSystemInfoHelper.cs
I guess these old branches aren't worth servicing for the sake of documenting a class that is not even public nowadays.
TheMaximum commentedon Feb 21, 2021
I hadn't noticed it just being 1.0 and 1.1, I just looked into the code... thanks @KalleOlaviNiemitalo!
Don't know if you want to add it in for the older version (and if so, where should that be done), @carlossanlop ?
KalleOlaviNiemitalo commentedon Jul 12, 2025
In reply to #43900 (comment):
The NotFoundDirectoryContents source code does not define any constructors, and that causes the C# compiler to generate a public parameterless constructor, which is also shown in the source code for the reference assembly:
runtime/src/libraries/Microsoft.Extensions.FileProviders.Abstractions/ref/Microsoft.Extensions.FileProviders.Abstractions.cs
Line 31 in 5535e31
To preserve the API when adding XML documentation for this constructor, it should be defined as public.
Making the constructor private would be a breaking API change. AFAIK, there is no API proposal for such, and I don't think one would be approved.
Add missing API documentation for Microsoft.Extensions.FileProvider (d…