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.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxbool AddScriptableObjectModel(
Type type
)
Function AddScriptableObjectModel (
type As Type
) As Boolean
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.
Remarks2025-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:
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