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!

Reflection Emit Application Scenarios

This section describes some application scenarios for Reflection Emit.

Executing a Script in a Web Browser

In this scenario, a Web browser loads an HTML page containing a script program and executes the program. The steps are as follows:

Executing a Script in an ASP+ Page

In this scenario, an ASP+ page containing a script program is downloaded to a Web browser for the first time. The steps are as follows:

Compiling a Regular Expression

In this scenario, a compiler uses the Reflection Emit APIs to compile regular expressions in source code. A user can declare which regular expressions should be compiled.

The user incurs a performance penalty when the first instance of a regular expression is used because the compiler needs to compile the expression into a scanner class. However, subsequent uses of the same regular expression are executed efficiently. For regular expressions that are used frequently, the one-time compilation penalty is insignificant since 30-500% speedup in execution time is possible.