Click or drag to resize

BasicNoUIObjAddSafeReference Method

Extends the WWB.NET language using an assembly reference.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
public bool AddSafeReference(
	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 AddSafeReference is successful.

Implements

IBasicNoUIAddSafeReference(Assembly, String)
Remarks

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

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

Only public types and members are accessible. All accessible types and members are considered safe for sandboxing.

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

Example
Add an assembly and automatic Imports:
basicIdeCtl1.AddSafeReference(typeof(MyAssembly.MyType).Assembly,
    "MyAssembly");
See Also