Documentation Center

Defining namespaces and assemblies

The Content Manager metadata configuration predefines a set of assemblies and namespaces that are supported by default by the script. However, you can use classes and members belonging to a namespace that is not on the predefined list by importing the assembly and namespace in script block.

Assemblies

The following assemblies are referenced by default:

  • System.dll
  • System.Xml.dll
  • Microsoft.VisualBasic.dll (Visual Basic only)
  • Trisoft.Scripting.dll

You can import additional assemblies using the assembly element. The assembly element has the following definition:

<assembly name="assemblyName" />

<assembly href="path-name" />

The name attribute contains the name of the assembly or you can use the href attribute that contains the path to the assembly. The assembly name can be a full name, such as "System.Data, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089".

Namespaces

The following namespaces are included by default:

  • System
  • Microsoft.VisualBasic (Visual Basic only)

You can add support for additional namespaces using the using element. The attribute value is the name of the namespace.

<using namespace="namespaceName" />