GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

Wrong namespace usage #111

Open janschmidmaier50 opened 1 year ago

janschmidmaier50 commented 1 year ago

The Arc4u must not define classes in non-Arc4u namespaces. Especially it must not define classes in the System or Microsoft namespace.

There are right now 8 definitions in the namespace Microsoft.Extensions.DependencyInjection and 8 in System.

❌ DO NOT put extension methods in the same namespace as the extended type unless it is for adding methods to interfaces or for dependency management.

see https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/extension-methods

Doing so will lead to confusion, because it looks like the used method is from the .net framework (because it is defined in system). There is no using indicating, it comes from Arc4u. Also the documentation is showing the System namespace. Only the assembly in the documentation is showing, that it is actually defined somewhere else. image