Struct WasmerValue
This object can wrap an int, long, float or double. The Tag property describes the actual payload, and the I32, I64, F32 and F64 fields provide access to the underlying data. Implicit conversion from those data types to WasmerValue exist, and explicit conversions from a WasmerValue to those types exist.
Namespace: WasmerSharp
Assembly: WasmerSharp.dll
Syntax
public struct WasmerValue
Fields
F32
The 32-bit floating point component, when the Tag is Float32
Declaration
public float F32;
Field Value
Type | Description |
---|---|
System.Single | To be added. |
F64
The 64-bit floating point component, when the Tag is Float64
Declaration
public double F64;
Field Value
Type | Description |
---|---|
System.Double | To be added. |
I32
The 32-bit integer component, when the Tag is Int32
Declaration
public int I32;
Field Value
Type | Description |
---|---|
System.Int32 | To be added. |
I64
The 64-bit integer component, when the Tag is Int64
Declaration
public long I64;
Field Value
Type | Description |
---|---|
System.Int64 | To be added. |
Tag
The underlying type for the value stored here.
Declaration
public WasmerSharp.WasmerValueType Tag;
Field Value
Type | Description |
---|---|
WasmerValueType | To be added. |
Methods
Encode()
Returns a boxed object that contains the underlying .NET type (int, long, float, double) based on the Tag for this value.
Declaration
public object Encode ();
Returns
Type | Description |
---|---|
System.Object | The boxed value. |
Operators
op_Explicit(WasmerValue to Double)
Returns the stored value as a double. This will cast if the value is not a native double.
Declaration
public static double op_Explicit (WasmerSharp.WasmerValue val);
Parameters
Type | Name | Description |
---|---|---|
WasmerValue | val | The incoming WasmerValue. |
Returns
Type | Description |
---|---|
System.Double | To be added. |
op_Explicit(WasmerValue to Int32)
Returns the stored value as an int. This will cast if the value is not a native int.
Declaration
public static int op_Explicit (WasmerSharp.WasmerValue val);
Parameters
Type | Name | Description |
---|---|---|
WasmerValue | val | The incoming WasmerValue. |
Returns
Type | Description |
---|---|
System.Int32 | To be added. |
op_Explicit(WasmerValue to Int64)
Returns the stored value as a long. This will cast if the value is not a native long.
Declaration
public static long op_Explicit (WasmerSharp.WasmerValue val);
Parameters
Type | Name | Description |
---|---|---|
WasmerValue | val | The incoming WasmerValue. |
Returns
Type | Description |
---|---|
System.Int64 | To be added. |
op_Explicit(WasmerValue to Single)
Returns the stored value as a float. This will cast if the value is not a native float.
Declaration
public static float op_Explicit (WasmerSharp.WasmerValue val);
Parameters
Type | Name | Description |
---|---|---|
WasmerValue | val | The incoming WasmerValue. |
Returns
Type | Description |
---|---|
System.Single | To be added. |
op_Implicit(Double to WasmerValue)
Creates a WasmerValue from an double
Declaration
public static WasmerSharp.WasmerValue op_Implicit (double val);
Parameters
Type | Name | Description |
---|---|---|
System.Double | val | Double value to wrap |
Returns
Type | Description |
---|---|
WasmerValue | To be added. |
op_Implicit(Int32 to WasmerValue)
Creates a WasmerValue from an integer
Declaration
public static WasmerSharp.WasmerValue op_Implicit (int val);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | val | Integer value to wrap |
Returns
Type | Description |
---|---|
WasmerValue | To be added. |
op_Implicit(Int64 to WasmerValue)
Creates a WasmerValue from an long
Declaration
public static WasmerSharp.WasmerValue op_Implicit (long val);
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | val | Long value to wrap |
Returns
Type | Description |
---|---|
WasmerValue | To be added. |
op_Implicit(Single to WasmerValue)
Creates a WasmerValue from an float
Declaration
public static WasmerSharp.WasmerValue op_Implicit (float val);
Parameters
Type | Name | Description |
---|---|---|
System.Single | val | Float value to wrap |
Returns
Type | Description |
---|---|
WasmerValue | To be added. |