Class Context
- Namespace
- JavaScriptCore.Internal
- Assembly
- JavaScriptCore-6.0.dll
public class Context
- Inheritance
-
Context
- Inherited Members
Methods
CheckSyntax(IntPtr, NonNullableUtf8StringHandle, long, CheckSyntaxMode, NonNullableUtf8StringHandle, uint, out IntPtr)
Calls native method jsc_context_check_syntax.
public static extern CheckSyntaxResult CheckSyntax(IntPtr context, NonNullableUtf8StringHandle code, long length, CheckSyntaxMode mode, NonNullableUtf8StringHandle uri, uint lineNumber, out IntPtr exception)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
code
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
length
longTransfer ownership: None Nullable: False
mode
CheckSyntaxModeTransfer ownership: None Nullable: False
uri
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
lineNumber
uintTransfer ownership: None Nullable: False
exception
IntPtrTransfer ownership: Full Nullable: False
Returns
- CheckSyntaxResult
Transfer ownership: None Nullable: False
ClearException(IntPtr)
Calls native method jsc_context_clear_exception.
public static extern void ClearException(IntPtr context)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
Evaluate(IntPtr, NonNullableUtf8StringHandle, long)
Calls native method jsc_context_evaluate.
public static extern IntPtr Evaluate(IntPtr context, NonNullableUtf8StringHandle code, long length)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
code
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
length
longTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: Full Nullable: False
EvaluateInObject(IntPtr, NonNullableUtf8StringHandle, long, IntPtr, IntPtr, NonNullableUtf8StringHandle, uint, out IntPtr)
Calls native method jsc_context_evaluate_in_object.
public static extern IntPtr EvaluateInObject(IntPtr context, NonNullableUtf8StringHandle code, long length, IntPtr objectInstance, IntPtr objectClass, NonNullableUtf8StringHandle uri, uint lineNumber, out IntPtr @object)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
code
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
length
longTransfer ownership: None Nullable: False
objectInstance
IntPtrTransfer ownership: None Nullable: True
objectClass
IntPtrTransfer ownership: None Nullable: True
uri
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
lineNumber
uintTransfer ownership: None Nullable: False
object
IntPtr
Returns
- IntPtr
Transfer ownership: Full Nullable: False
EvaluateWithSourceUri(IntPtr, NonNullableUtf8StringHandle, long, NonNullableUtf8StringHandle, uint)
Calls native method jsc_context_evaluate_with_source_uri.
public static extern IntPtr EvaluateWithSourceUri(IntPtr context, NonNullableUtf8StringHandle code, long length, NonNullableUtf8StringHandle uri, uint lineNumber)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
code
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
length
longTransfer ownership: None Nullable: False
uri
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
lineNumber
uintTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: Full Nullable: False
GetCurrent()
Calls native function jsc_context_get_current.
public static extern IntPtr GetCurrent()
Returns
- IntPtr
Transfer ownership: None Nullable: True
GetException(IntPtr)
Calls native method jsc_context_get_exception.
public static extern IntPtr GetException(IntPtr context)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: None Nullable: True
GetGType()
Calls native function jsc_context_get_type.
public static extern nuint GetGType()
Returns
- nuint
Transfer ownership: None Nullable: False
GetGlobalObject(IntPtr)
Calls native method jsc_context_get_global_object.
public static extern IntPtr GetGlobalObject(IntPtr context)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: Full Nullable: False
GetValue(IntPtr, NonNullableUtf8StringHandle)
Calls native method jsc_context_get_value.
public static extern IntPtr GetValue(IntPtr context, NonNullableUtf8StringHandle name)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
name
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: Full Nullable: False
GetVirtualMachine(IntPtr)
Calls native method jsc_context_get_virtual_machine.
public static extern IntPtr GetVirtualMachine(IntPtr context)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: None Nullable: False
New()
Calls native constructor jsc_context_new.
public static extern IntPtr New()
Returns
- IntPtr
Transfer ownership: Full Nullable: False
NewWithVirtualMachine(IntPtr)
Calls native constructor jsc_context_new_with_virtual_machine.
public static extern IntPtr NewWithVirtualMachine(IntPtr vm)
Parameters
vm
IntPtrTransfer ownership: None Nullable: False
Returns
- IntPtr
Transfer ownership: Full Nullable: False
PopExceptionHandler(IntPtr)
Calls native method jsc_context_pop_exception_handler.
public static extern void PopExceptionHandler(IntPtr context)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
PushExceptionHandler(IntPtr, ExceptionHandler, IntPtr, DestroyNotify)
Calls native method jsc_context_push_exception_handler.
public static extern void PushExceptionHandler(IntPtr context, ExceptionHandler handler, IntPtr userData, DestroyNotify destroyNotify)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
handler
ExceptionHandlerTransfer ownership: None Nullable: False
userData
IntPtrTransfer ownership: None Nullable: True
destroyNotify
DestroyNotifyTransfer ownership: None Nullable: True
RegisterClass(IntPtr, NonNullableUtf8StringHandle, IntPtr, ClassVTableHandle, DestroyNotify)
Calls native method jsc_context_register_class.
public static extern IntPtr RegisterClass(IntPtr context, NonNullableUtf8StringHandle name, IntPtr parentClass, ClassVTableHandle vtable, DestroyNotify destroyNotify)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
name
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
parentClass
IntPtrTransfer ownership: None Nullable: True
vtable
ClassVTableHandleTransfer ownership: None Nullable: True
destroyNotify
DestroyNotifyTransfer ownership: None Nullable: True
Returns
- IntPtr
Transfer ownership: None Nullable: False
SetValue(IntPtr, NonNullableUtf8StringHandle, IntPtr)
Calls native method jsc_context_set_value.
public static extern void SetValue(IntPtr context, NonNullableUtf8StringHandle name, IntPtr value)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
name
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
value
IntPtrTransfer ownership: None Nullable: False
Throw(IntPtr, NonNullableUtf8StringHandle)
Calls native method jsc_context_throw.
public static extern void Throw(IntPtr context, NonNullableUtf8StringHandle errorMessage)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
errorMessage
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
ThrowException(IntPtr, IntPtr)
Calls native method jsc_context_throw_exception.
public static extern void ThrowException(IntPtr context, IntPtr exception)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
exception
IntPtrTransfer ownership: None Nullable: False
ThrowWithName(IntPtr, NonNullableUtf8StringHandle, NonNullableUtf8StringHandle)
Calls native method jsc_context_throw_with_name.
public static extern void ThrowWithName(IntPtr context, NonNullableUtf8StringHandle errorName, NonNullableUtf8StringHandle errorMessage)
Parameters
context
IntPtrTransfer ownership: None Nullable: False
errorName
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False
errorMessage
NonNullableUtf8StringHandleTransfer ownership: None Nullable: False