IBasicNoUIAddScriptableReference Method |
Extends the WWB.NET language using an assembly reference.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxbool AddScriptableReference(
Assembly assembly,
string imports = null
)
Function AddScriptableReference (
assembly As Assembly,
Optional imports As String = Nothing
) As Boolean
bool AddScriptableReference(
Assembly^ assembly,
String^ imports = nullptr
)
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.
Remarks2025-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:
Exampleinternal class ScriptableAttribute : Attribute
{
public override object TypeId { get { return new Guid("542F6A10-6097-445A-B09E-A248863C2873"); } }
}
Friend Class ScriptableAttribute
Inherits Attribute
Public Overrides ReadOnly Property TypeId As Object
Get
Return New Guid("542F6A10-6097-445A-B09E-A248863C2873")
End Get
End Property
End Class
No code example is currently available or this language may not be supported.
Use RemoveExtensions("") to remove all the references and automatic imports.
See Also