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!

Defining a Dynamic Module

Defining a Dynamic Module in a Static Assembly

Dynamic modules in a static assembly are defined using the Assembly.DefineDynamicModule method. DefineDynamicModule returns a ModuleBuilder object. These modules are always transient. The following variations of Assembly.DefineDynamicModule are provided:

Defining a Transient Dynamic Module in a Dynamic Assembly

Transient dynamic modules in a dynamic assembly are created using the AssemblyBuilder.DefineDynamicModule(String name) method. This method is inherited from System.Assembly.

Defining a Persistable Dynamic Module in a Dynamic Assembly

Persistable dynamic modules in a dynamic assembly are created using the AssemblyBuilder.DefineDynamicModule methods. The dynamic assembly must have been created with the AssemblyBuilderAccess argument specified as Save or RunAndSave. DefineDynamicModule returns an AssemblyBuilder object. The following variations of AssemblyBuilder.DefineDynamicModule are provided:

The dynamic module is saved when the containing dynamic assembly is saved. To generate an executable, the ModuleBuilder.SetEntryPoint method must be called to identify the method that is the entry point to the module. If no entry point is specified, a DLL will be generated.