-
Notifications
You must be signed in to change notification settings - Fork 4
Gendarme.Rules.Naming.AvoidDeepNamespaceHierarchyRule(2.10)
Assembly: Gendarme.Rules.Naming
Version: 2.10
This rule checks for deeply nested namespaces within an assembly. It will warn if the depth is greater than four (default value) unless the fifth (or the next) part is one of the specialized name that the framework recommends or a name like an internal namespace (something not meant to be seen outside the assembly).
- Design : Namespace that provides design-time support for its base namespace.
- Interop : Namespace that provides all interoperability code (e.g. p./invokes) for its base namespace.
- Permissions : Namespace that provides all custom permissions for its base namespace.
- Internal : Namespace that provides non visible (outside the assembly) helper code for its base namespace. Impl while allowed by the rule is not encouraged.
Bad example:
namespace One.Two.Three.Four.Five {
internal class Helper {
}
}
Good example:
namespace One.Two.Three.Four {
internal class FiveHelper {
}
}
Good example (exception for some namespace specialization):
namespace One.Two.Three.Four.Internal {
internal class Helper {
}
}
Some elements of this rule can be customized to better fit your needs.
The depth at which namespaces may be nested without triggering a defect.
Note that this page was autogenerated (3/17/2011 9:31:58 PM) based on the xmldoc
comments inside the rules source code and cannot be edited from this wiki.
Please report any documentation errors, typos or suggestions to the
Gendarme Mailing List. Thanks!