XQuerySettings.EnableScript PropertyXQuerySettings.EnableScript PropertyXQuerySettings::EnableScript Property

Gets or sets a value indicating whetherr to enable support for .NET script modules.

Syntax

Public Property EnableScript As Boolean
        Get
        Set(ByVal value As Boolean)
public bool EnableScript { get; set; }
public:
property bool EnableScript {
    bool get();
    void set(bool value);
}
 

Property Value

Type: System.BooleanSystem.BooleanSystem::Boolean

trueTruetrue to support .NET script modules in XQuery programs; otherwise, falseFalsefalse.

Remarks

The default value is falseFalsefalse.

When enabled, a query may import a c# source file using the syntax:

 
import module namespace ext = "http://www.example.org/xpath-functions" at "script.cs";
            ext:nativeFunction(1, "value")
            
 

XQuery scripting should be enabled only if you require script support and you are working in a fully trusted environment.