Skip to content

Class ClassInfo

Namespace: Apogee.Reflection
Assembly: Apogee.Reflection.dll

What the registry knows about an class. Members are looked up by script name, inherited ones included.

public sealed class ClassInfo

Inheritance

object ← ClassInfo

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

ClassInfo(string, string?, Type, PropertyDef[], MethodDef[], SignalDef[], Func<EngineObject>?, bool, bool, string?)

public ClassInfo(string name, string? baseName, Type clrType, PropertyDef[] properties, MethodDef[] methods, SignalDef[] signals, Func<EngineObject>? factory = null, bool scriptable = true, bool modsBlocked = false, string? doc = null)

Parameters

name string

baseName string?

clrType Type

properties PropertyDef[]

methods MethodDef[]

signals SignalDef[]

factory Func<EngineObject>?

scriptable bool

modsBlocked bool

doc string?

Properties

Base

public ClassInfo? Base { get; }

Property Value

ClassInfo?

BaseName

The name of the closest reflected base class, or null.

public string? BaseName { get; }

Property Value

string?

ClrType

public Type ClrType { get; }

Property Value

Type

Creatable

True for a class scripts can create with new().

public bool Creatable { get; }

Property Value

bool

Doc

public string? Doc { get; }

Property Value

string?

Methods

public MethodDef[] Methods { get; }

Property Value

MethodDef[]

ModsBlocked

Objects of this class are refused to mods.

public bool ModsBlocked { get; }

Property Value

bool

Name

public string Name { get; }

Property Value

string

Properties

The members declared by this class itself.

public PropertyDef[] Properties { get; }

Property Value

PropertyDef[]

Scriptable

public bool Scriptable { get; }

Property Value

bool

Signals

public SignalDef[] Signals { get; }

Property Value

SignalDef[]

Methods

Create()

Creates an object of this class; the class must be .

public EngineObject Create()

Returns

EngineObject

FindMethod(string)

public MethodDef? FindMethod(string scriptName)

Parameters

scriptName string

Returns

MethodDef?

FindProperty(string)

public PropertyDef? FindProperty(string scriptName)

Parameters

scriptName string

Returns

PropertyDef?

FindSignal(string)

public SignalDef? FindSignal(string scriptName)

Parameters

scriptName string

Returns

SignalDef?

IsSubclassOf(ClassInfo)

public bool IsSubclassOf(ClassInfo other)

Parameters

other ClassInfo

Returns

bool