Home

Castle Stronghold

Configuring

The default configuration should suffice for most cases, but if you want to change the configuration, you can do so by adding a configuration section handler to the web.config file:


<configSections>
  <section name="Brail" type="Brail.BrailConfigurationSection, Brail" />
</configSections>

Here is the default configuration for Brail:


<Brail
    debug="false"
    saveToDisk="false"
    saveDirectory="Brail_Generated_Code"
    batch="true"
    commonScriptsDirectory="CommonScripts">

    <reference assembly="My.Assembly.Name"/>
    <import  namespace="My.Assembly.Name"/>
</Brail>
Option:Default Value:Possible values:
debugGenerate debug or retail codefalsetrue - generate debug code

false - generate retial code
saveToDiskSave the generated assemblies to disk - useful if you want to know what is going on behind the scenes.falsetrue - save assemblies to disk

false - use entirely in memory
saveDirectoryThe directory to save the generated assemblies to.

The path can be relative or absolute, if relative, the default ASP.Net bin path will be used.

If the directory does not exist, it will be created.
"Brail_Generated_Code"Any valid path
batchBatch compilation, compile all the scripts in one folder to a single assembly.

This does not work recursively.
truetrue - all scripts in a folder will be compiled to a single assembly

false - each script will be compiled to its own assembly
commonScriptsDirectory The directory where all the common scripts are. This can be a relative or absolute path, if relative, the Views directory of the application will be used as the base.

If the directory does not exist, it will not be created.
"CommonScripts"Any valid path
reference element, assembly attributeThis tells Brails that all your scripts should reference the specified assembly or assemblies. This allows strong typing in the views and avoids the cost of reflection.noneThe assembly attribute must contain a valid assembly name that is reachable to the application by using Assembly.Load(). Usually this means that it's located in the bin directory of the application.
import element, namespace attributeThis tells Brails that all your scripts should import the specified namespace or namespaces. This allows shorter naming in the script.noneAny valid namespace
Google
Search WWW Search castleproject.org