Class Value
- Namespace
- JavaScriptCore
- Assembly
- JavaScriptCore-6.0.dll
public sealed class Value : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
- Inheritance
-
Value
- Implements
- Inherited Members
Constructors
Value(params ConstructArgument[])
[Obsolete("Regular C# constructors on native classes will be removed in a future version. Please see the linked documentation for more details. It contains scenarios and possible solutions to prepare for the upcoming changes.", DiagnosticId = "GirCore1007", UrlFormat = "https://gircore.github.io/docs/integration/diagnostic/1007.html")]
public Value(params ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]
Value(CreationData)
[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Value(CreationData data)
Parameters
dataCreationData
Value(ValueHandle)
protected Value(ValueHandle handle)
Parameters
handleValueHandle
Fields
ContextPropertyDefinition
public static readonly Property<Context?, Value> ContextPropertyDefinition
Field Value
Properties
Context
public Context? Context { get; }
Property Value
Methods
ArrayBufferGetSize()
[Version("2.38")]
public nuint ArrayBufferGetSize()
Returns
ConstructorCall(uint, Value[])
public Value ConstructorCall(uint nParameters, Value[] parameters)
Parameters
Returns
FunctionCall(uint, Value[])
public Value FunctionCall(uint nParameters, Value[] parameters)
Parameters
Returns
GetContext()
public Context GetContext()
Returns
GetGType()
public static Type GetGType()
Returns
IsArray()
public bool IsArray()
Returns
IsArrayBuffer()
[Version("2.38")]
public bool IsArrayBuffer()
Returns
IsBoolean()
public bool IsBoolean()
Returns
IsConstructor()
public bool IsConstructor()
Returns
IsFunction()
public bool IsFunction()
Returns
IsNull()
public bool IsNull()
Returns
IsNumber()
public bool IsNumber()
Returns
IsObject()
public bool IsObject()
Returns
IsString()
public bool IsString()
Returns
IsTypedArray()
[Version("2.38")]
public bool IsTypedArray()
Returns
IsUndefined()
public bool IsUndefined()
Returns
NewArrayFromGarray(Context, PtrArray?)
public static Value NewArrayFromGarray(Context context, PtrArray? array)
Parameters
Returns
NewArrayFromStrv(Context, string[])
public static Value NewArrayFromStrv(Context context, string[] strv)
Parameters
Returns
NewBoolean(Context, bool)
public static Value NewBoolean(Context context, bool value)
Parameters
Returns
NewFromJson(Context, string)
[Version("2.28")]
public static Value NewFromJson(Context context, string json)
Parameters
Returns
NewFromPointer(nint, bool)
Creates a new managed Value instance for a given pointer.
public static Value NewFromPointer(nint ptr, bool ownsHandle)
Parameters
Returns
NewFunctionVariadic(Context, string?, Callback, Type)
public static Value NewFunctionVariadic(Context context, string? name, Callback callback, Type returnType)
Parameters
Returns
NewNull(Context)
public static Value NewNull(Context context)
Parameters
contextContext
Returns
NewNumber(Context, double)
public static Value NewNumber(Context context, double number)
Parameters
Returns
NewObject(Context, nint, Class?)
public static Value NewObject(Context context, nint instance, Class? jscClass)
Parameters
Returns
NewPromise(Context, Executor)
[Version("2.48")]
public static Value NewPromise(Context context, Executor executor)
Parameters
Returns
NewString(Context, string?)
public static Value NewString(Context context, string? @string)
Parameters
Returns
NewStringFromBytes(Context, Bytes?)
public static Value NewStringFromBytes(Context context, Bytes? bytes)
Parameters
Returns
NewTypedArray(Context, TypedArrayType, nuint)
[Version("2.38")]
public static Value NewTypedArray(Context context, TypedArrayType type, nuint length)
Parameters
contextContexttypeTypedArrayTypelengthnuint
Returns
NewTypedArrayWithBuffer(TypedArrayType, nuint, nint)
[Version("2.38")]
public Value NewTypedArrayWithBuffer(TypedArrayType type, nuint offset, nint length)
Parameters
typeTypedArrayTypeoffsetnuintlengthnint
Returns
NewUndefined(Context)
public static Value NewUndefined(Context context)
Parameters
contextContext
Returns
NewWithProperties(ConstructArgument[])
Creates a new Value and sets the properties specified by the construct arguments.
public static Value NewWithProperties(ConstructArgument[] constructArguments)
Parameters
constructArgumentsConstructArgument[]The properties to set.
Returns
ObjectDefinePropertyData(string, ValuePropertyFlags, Value?)
public void ObjectDefinePropertyData(string propertyName, ValuePropertyFlags flags, Value? propertyValue)
Parameters
propertyNamestringflagsValuePropertyFlagspropertyValueValue
ObjectDeleteProperty(string)
public bool ObjectDeleteProperty(string name)
Parameters
namestring
Returns
ObjectEnumerateProperties()
public string[]? ObjectEnumerateProperties()
Returns
- string[]
ObjectGetProperty(string)
public Value ObjectGetProperty(string name)
Parameters
namestring
Returns
ObjectGetPropertyAtIndex(uint)
public Value ObjectGetPropertyAtIndex(uint index)
Parameters
indexuint
Returns
ObjectHasProperty(string)
public bool ObjectHasProperty(string name)
Parameters
namestring
Returns
ObjectInvokeMethod(string, uint, Value[])
public Value ObjectInvokeMethod(string name, uint nParameters, Value[] parameters)
Parameters
Returns
ObjectIsInstanceOf(string)
public bool ObjectIsInstanceOf(string name)
Parameters
namestring
Returns
ObjectSetProperty(string, Value)
public void ObjectSetProperty(string name, Value property)
Parameters
ObjectSetPropertyAtIndex(uint, Value)
public void ObjectSetPropertyAtIndex(uint index, Value property)
Parameters
ToBoolean()
public bool ToBoolean()
Returns
ToDouble()
public double ToDouble()
Returns
ToInt32()
public int ToInt32()
Returns
ToJson(uint)
[Version("2.28")]
public string ToJson(uint indent)
Parameters
indentuint
Returns
ToString()
public string ToString()
Returns
ToStringAsBytes()
public Bytes ToStringAsBytes()
Returns
TypedArrayGetBuffer()
[Version("2.38")]
public Value TypedArrayGetBuffer()
Returns
TypedArrayGetData(out nuint)
[Version("2.38")]
public nint TypedArrayGetData(out nuint length)
Parameters
lengthnuint
Returns
TypedArrayGetLength()
[Version("2.38")]
public nuint TypedArrayGetLength()
Returns
TypedArrayGetOffset()
[Version("2.38")]
public nuint TypedArrayGetOffset()
Returns
TypedArrayGetSize()
[Version("2.38")]
public nuint TypedArrayGetSize()
Returns
TypedArrayGetType()
[Version("2.38")]
public TypedArrayType TypedArrayGetType()