Click or drag to resize

IBasicNoUIAddScriptableReference Method

Extends the WWB.NET language using an assembly reference.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
bool AddScriptableReference(
	Assembly assembly,
	string imports = null
)

Parameters

assembly  Assembly
Add this reference to the WWB.NET language.
imports  String  (Optional)
All macros are parsed with automatic Imports for each import in the string. (Separate imports with a space.) To add a safe reference to a specific module prefix it with "modulepath|".

Return Value

Boolean
True if AddScriptableReference is successful.
Remarks

2025-01-24: This method does not use the Scriptable attribute at this time.

The WWB.NET language is extended using the assembly with automatic imports.

Only public types and members with the Scriptable attribute are accessible. Use this attribute on a type or member to enable WinWrap Basic script access to the type or type's member. (A member with the Scriptable attribute will only be scriptable if the parameter and return types are allowed.)

The following types and their members are scriptable if:

  • types added by AddScriptableReference have the Scriptable attribute
  • members of types above have the Scriptable attribute

To avoid versioning problems the WinWrap Basic assembly does not define the ScriptableAttribute. To make an assembly scriptable you must add the ScriptableAttribute implementation to your assembly:

Example
internal class ScriptableAttribute : Attribute
{
    public override object TypeId { get { return new Guid("542F6A10-6097-445A-B09E-A248863C2873"); } }
}

Use RemoveExtensions("") to remove all the references and automatic imports.

See Also