C# Code Generation Settings
When you generate C# code for an XQuery, Stylus Studio displays the C# Code Generation dialog box.
You use this dialog box to specify
l The target directory in which you want the C# code created. c:\temp\myPipelineC#Code, for example. If the directory you name does not exist, Stylus Studio creates it when you run the Code Generation wizard.
The default is a \sources directory created in your Windows user data directory - C:\Documents and Settings\sula\My Documents\Stylus Studio\sources, for example.
l Optionally, a namespace name. If you specify a namespace name, this name is used for a subfolder created in the target directory you specify. If you specify myNamespace as the package name, for example, the generated code is written to c:\temp\myC#Code\myNamespace. (Though optional, it is considered good practice to create a namespace name.)
l The class name. Stylus Studio also uses the class name for the .cs file created by the Code Generation wizard. For example, if you provide the name myClass, Stylus Studio creates c:\temp\myC#Code\myNamespace\myClass.cs.
The default class name is taken from the XQuery file name.
l The location of Saxon .NET on your system. Stylus Studio adds this URL to the Microsoft Visual Studio 2005 project, allowing the generated C# code for .NET to compile.
l Whether or not you want the resulting .cs file to contain a static void Main(String
[ ] args) method.
l Whether or not you want to open the generated code file. If selected, the generated C# file is opened in whatever application is registered to open .cs files.
l Whether or not you want to embed the XQuery source in the generated C# code. This option is available when using either the Saxon XQuery or DataDirect XQuery processors.
Note: This option appears only if you are generating XQuery code.
l Whether or not you want to either create a new Visual Studio 2005 project or update an existing one. If a new project is created, it is automatically opened with whatever application is registered to open .csproj files. The .csproj file contains all the necessary references to the generated .cs file, as well as all the .dll files that the .cs file requires.
To run the .cs file, simply press Ctrl+F5 in Visual Studio.