BasicNoUIObjAddReference Method |
Extends the WWB.NET language using an assembly reference.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic bool AddReference(
Assembly assembly,
string? imports = null,
SandboxRules? sandboxRules = null
)
Public Function AddReference (
assembly As Assembly,
Optional imports As String = Nothing,
Optional sandboxRules As SandboxRules = Nothing
) As Boolean
public:
virtual bool AddReference(
Assembly^ assembly,
String^ imports = nullptr,
SandboxRules^ sandboxRules = nullptr
) sealed
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.)
- sandboxRules SandboxRules (Optional)
-
Use these sandbox rules to determine which types and members are accessible.
If omitted or null the SandboxRules property is used
when the Sandboxed property is true.
Return Value
Boolean
True if
AddReference is successful.
Implements
IBasicNoUIAddReference(Assembly, String, SandboxRules)
Remarks
The WWB.NET language is extended using the assembly with automatic imports.
Only public types and members are accessible.
Specific SandboxRules can further restrict the types and members.
Use RemoveExtensions("") to remove all the references and automatic imports.
Example
Add an assembly and automatic Imports:
basicIdeCtl1.AddReference(typeof(System.Windows.Forms.Form).Assembly,
"System.Windows.Forms");
BasicIdeCtl1.AddReference(GetType(System.Windows.Forms.Form).Assembly,
"System.Windows.Forms")
basicIdeCtl1->AddReference(typeof(System.Windows.Forms.Form)->Assembly,
"System.Windows.Forms");
See Also