c# - How to organise namespaces within an assembly to reflect design -


i organise assembly code write reflects intended design. received understand namespaces principal way organise types achieve this.

the issue have assembly, assembly, say, uses layer of implementation classes. of classes in layer1 part of implementation of layer1 , i'd reflect in way structure code. first thought try make classes in layer1 private, can see this not possible.

logically, layer1 exposing classes a1, b1, c1 etc. , uses classes a2, b2, c2 etc.

namespace assembly.layer1 {     // "interface layer1"     class a1 // ...     class b1 // ...     class c1 // ...     // "implementation of layer1"     class a2 // ...     class b2 // ...     class c2 // ... } // (one file per class) 

it seems 1 way address put a2, b2, c2 etc new namespace, assembly.layer1.layer2. then, when i'm writing code in top-level namespace , using assembly.layer1, intellisense shows me classes assembly.layer1 exposes. also, by convention, should refer 1 layer down in namespace hierarchy @ time. right approach?


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -