ComponentImports Class

The imports of a component, by name: functions, instances (nested ComponentImports, or instances of other components), resource types, core modules and components. A name with a version (wasi:cli/stdout@0.2.3) also satisfies the imports of a compatible version (wasi:cli/stdout@0.2.0).

public sealed class ComponentImports

Constructors

NameDescription
ComponentImports()

ComponentImports()

WasmComponent.cs
public ComponentImports()

No documentation is available.

Properties

NameDescription
NamesGets the names of the definitions.

Gets the names of the definitions.

public IEnumerable<string> Names { get; }

Property value

IEnumerable<string>

Methods

NameDescription
Define(string, ComponentFunction)Defines a function.
Define(string, ComponentImports)Defines an instance: the definitions of instance.
Define(string, ComponentType)Defines a type, such as a resource type of the host.
Define(string, WasmComponent)Defines a component.
Define(string, WasmComponentInstance)Defines an instance of a component.
Define(string, WasmModule)Defines a core module.
DefineAll(WasmComponentInstance)Defines all the exports of an instance of a component, with their names.

Define overloads

Define(string, ComponentFunction)

WasmComponent.cs

Defines a function.

public ComponentImports Define(string name, ComponentFunction function)
Parameters
name string
function ComponentFunction
Returns

ComponentImports

Define(string, ComponentImports)

WasmComponent.cs

Defines an instance: the definitions of instance.

public ComponentImports Define(string name, ComponentImports instance)
Parameters
name string
instance ComponentImports
Returns

ComponentImports

Define(string, ComponentType)

WasmComponent.cs

Defines a type, such as a resource type of the host.

public ComponentImports Define(string name, ComponentType type)
Parameters
name string
type ComponentType
Returns

ComponentImports

Define(string, WasmComponent)

WasmComponent.cs

Defines a component.

public ComponentImports Define(string name, WasmComponent component)
Parameters
name string
component WasmComponent
Returns

ComponentImports

Define(string, WasmComponentInstance)

WasmComponent.cs

Defines an instance of a component.

public ComponentImports Define(string name, WasmComponentInstance instance)
Parameters
name string
instance WasmComponentInstance
Returns

ComponentImports

Define(string, WasmModule)

WasmComponent.cs

Defines a core module.

public ComponentImports Define(string name, WasmModule module)
Parameters
name string
module WasmModule
Returns

ComponentImports

DefineAll(WasmComponentInstance)

WasmComponent.cs

Defines all the exports of an instance of a component, with their names.

public ComponentImports DefineAll(WasmComponentInstance instance)

Parameters

instance WasmComponentInstance

Returns

ComponentImports