DnsClient.NET icon indicating copy to clipboard operation
DnsClient.NET copied to clipboard

Does the Internal namespace need to have public members?

Open TWhidden opened this issue 1 year ago • 2 comments

This is purely a selfish request - The ILoggerFactory is a common dotnet interface, which when using this library for anything will become the first-priority for selection. Downside is, it gets selected before the official MS libs if you are flying through code

image

Any chance those accessors could be marked internal instead of public? I am unsure why they would need to be exposed if they are in what most would say, an internal folder for lib internals only. Just my .02c, and again, purely selfish for my auto-complete sanity!

https://github.com/MichaCo/DnsClient.NET/blob/b9e9050b1194c2234bc8a9f99a891fb4bfcd6baf/src/DnsClient/Internal/ILoggerFactory.cs#L5

TWhidden avatar Feb 29 '24 22:02 TWhidden

The idea was to expose that interface so that a consumer can write a forwarding wrapper which could send log messages to the Microsoft.Extensions.Logging framework for example. For that it has to be public. I agree that the name could have been slightly different to prevent the issue you see, but hey..

An internal directory can totally have public APIs, its in internal to indicate it might change and the APIs might not be stable forever.

But to your request, I do not really want to change this atm. Sorry ;)

MichaCo avatar Mar 10 '24 21:03 MichaCo

All good. Doesn't hurt to ask!

TWhidden avatar Mar 10 '24 22:03 TWhidden