NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Assemblies and Type Identity

Assemblies are the construct used by the NGWS runtime to locate and load types. For all type references made in the scope of an assembly, the assembly manifest contains the information that the NGWS runtime uses to resolve the reference.

A type name in the NGWS runtime has logically two parts: the assembly name and the name of the type within the assembly. Two types with the same name but in different assemblies are treated as two distinct types.  

While the assembly portion of the name clearly has meaning in the runtime, no particular semantics are applied to the type portion of the name---to the runtime it is just a string. The runtime does not associate any sort of hierarchy with names within an assembly.

Assemblies provide consistency between the scope of names seen by the developer and the scope of names seen by the runtime system. Developers author types in the context of an assembly. The contents of the assembly a developer is building establishes the scope of names that will be available at runtime.

Namespaces

Particular languages have constructs (and corresponding syntax) that help developers form logical groups of classes. Java has packages, VB has modules, and C++ has its own concept of a namespace. These constructs can be used to build hierarchical namespaces of classes, such as WinForms.ui.button, WinForms.ui.brush or WinForms.core.event.

These constructs are used within the particular languages to help developers build assemblies, but the constructs themselves are not understood by the runtime and do not play a part in binding or in the visibility of names. To the runtime, a namespace is just type names. You can build a single assembly that exposed types that look like they come from two different hierarchical namespaces, such as System.Collections and System.WinForms. Or, you could build two assemblies that both export types whose names contain " MyDll.MyClass." 

If a tool wanted to present the above types as belonging to a hierarchical namespace, it would have to enumerate the types in any assembly or group of assemblies and parse the type names to derive a hierarchical relationship.