Table of Contents

Class Class

Namespace
JavaScriptCore
Assembly
JavaScriptCore-6.0.dll
public sealed class Class : Object, IDisposable, NativeObject, GTypeProvider, InstanceFactory
Inheritance
Class
Implements
Inherited Members

Constructors

Class(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 Class(params ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

Class(CreationData)

[Obsolete("This constructor is a workaround to keep legacy APIs alive. Do not use it.")]
protected Class(CreationData data)

Parameters

data CreationData

Class(ClassHandle)

protected Class(ClassHandle handle)

Parameters

handle ClassHandle

Fields

NamePropertyDefinition

public static readonly Property<string?, Class> NamePropertyDefinition

Field Value

Property<string, Class>

ParentPropertyDefinition

public static readonly Property<Class?, Class> ParentPropertyDefinition

Field Value

Property<Class, Class>

Properties

Name

public string? Name { get; }

Property Value

string

Parent

public Class? Parent { get; }

Property Value

Class

Methods

AddConstructorVariadic(string?, Callback, Type)

public Value AddConstructorVariadic(string? name, Callback callback, Type returnType)

Parameters

name string
callback Callback

A callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).

returnType Type

Returns

Value

AddMethodVariadic(string, Callback, Type)

public void AddMethodVariadic(string name, Callback callback, Type returnType)

Parameters

name string
callback Callback

A callback. If it raises an exception the application will terminate. To receive this unhandled exception see SetHandler(Action<Exception>?).

returnType Type

GetGType()

public static Type GetGType()

Returns

Type

GetName()

public string GetName()

Returns

string

GetParent()

public Class GetParent()

Returns

Class

NewFromPointer(nint, bool)

Creates a new managed Class instance for a given pointer.

public static Class NewFromPointer(nint ptr, bool ownsHandle)

Parameters

ptr nint
ownsHandle bool

Returns

Class

NewWithProperties(ConstructArgument[])

Creates a new Class and sets the properties specified by the construct arguments.

public static Class NewWithProperties(ConstructArgument[] constructArguments)

Parameters

constructArguments ConstructArgument[]

The properties to set.

Returns

Class