Click or drag to resize

IBasicNoUIAddScriptableObjectModel Method

Extends the WWB.NET language using a type's assembly and automatically imports the type's namespace and the type itself.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
bool AddScriptableObjectModel(
	Type type
)

Parameters

type  Type
Add this type's assembly to the WWB.NET language and import the type's namespace and the type itself.

Return Value

Boolean
True if AddScriptableObjectModel 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 type's assembly with automatic imports. This method is the equivalent of calling AddScriptableReference(type.Assembly, type.Namespace + " " + type.FullName).

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 AddScriptableObjectModel have the Scriptable attribute
  • members of types above have the Scriptable attribute

An assembly with the Scriptable attribute only exposes types and members also marked with 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