WasmImports Class
The imports of an instantiation, by module and name (see WasmStore.Instantiate).
public sealed class WasmImportsConstructors
| Name | Description |
|---|---|
| WasmImports() |
WasmImports()
WasmObjects.cspublic WasmImports()No documentation is available.
Methods
| Name | Description |
|---|---|
| Define(string, WasmInstance) | Defines the exports of an instance as the imports of a module. |
| Define(string, string, WasmExtern) | Defines an import, or replaces its value. |
| Get(string, string) | Returns the value of an import, or null. |
Define overloads
Define(string, WasmInstance)
WasmObjects.csDefines the exports of an instance as the imports of a module.
public WasmImports Define(string module, WasmInstance instance)Parameters
modulestring- The name of the module of the imports.
instanceWasmInstance- The instance whose exports are defined.
Returns
WasmImports The imports.
Define(string, string, WasmExtern)
WasmObjects.csDefines an import, or replaces its value.
public WasmImports Define(string module, string name, WasmExtern value)Parameters
modulestring- The name of the module of the import.
namestring- The name of the import.
valueWasmExtern- The value of the import.
Returns
WasmImports The imports.
Get(string, string)
WasmObjects.csReturns the value of an import, or null.
public WasmExtern? Get(string module, string name)