Got a quick question here. I've got an assembly being re-used by a few developers which contains various bits of functionality, but is technically split in various namespaces representing logical blocks of functionality.
Now, it's being offered with as few public namespaces as possible. Basically, the user shouldn't know (and currently doesn't know) which internal structure is being used for the class they're trying to use.
Let's say you have this:
NS1
- NS11
- Class 111
- Class 112
- NS Extensions
- Extension Class 1
- NS12
NS2
- ...
Basically, the users know they use FrameworkName.NS1 for general functionality regarding NS1. Now, in this simple example I've put a class containing extension methods in a subnamespace extensions, so basically, if an end user tries to use the assembly he'd have to actually know the internal structure of the DLL to know the extension exists (it's one of those examples where intellisense doesn't tell you you know).
So bottom line ... right now I've got this assembly and internally (the VS project) I divide the project into logical folders as one would normally do, but I do not let the namespaces follow the folders. This way the assembly's split up into logical blocks that users know w/o having to know the inner structures and don't need to know there could be seperate namespaces for extensions and so on.
Now, personally I'd like it if I could let my code's namespaces follow my folder structure, but somehow map those subnamespaces to the main namespace at compile-time.
Is it possible somehow to achieve this 'redirection' as you will?
To put it simply, I want to be able to address NS1.NS11.Class111 publically as NS1.Class111 outside of the assembly while still maintaining a proper structure inside the assembly.