Skip to content

Class TypeRegistry

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

Every class, enum, component and script library that the source generator described. Each assembly with reflected types registers its own from a module initializer, so the registry is complete before the first lookup.

public static class TypeRegistry

Inheritance

object ← TypeRegistry

Inherited Members

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

Properties

Classes

public static IReadOnlyList<ClassInfo> Classes { get; }

Property Value

IReadOnlyList<ClassInfo>

Components

public static IReadOnlyList<ComponentInfo> Components { get; }

Property Value

IReadOnlyList<ComponentInfo>

Enums

public static IReadOnlyList<EnumInfo> Enums { get; }

Property Value

IReadOnlyList<EnumInfo>

Libraries

public static IReadOnlyList<LibraryInfo> Libraries { get; }

Property Value

IReadOnlyList<LibraryInfo>

Methods

FindClass(string)

public static ClassInfo? FindClass(string name)

Parameters

name string

Returns

ClassInfo?

FindComponent(string)

public static ComponentInfo? FindComponent(string name)

Parameters

name string

Returns

ComponentInfo?

FindEnum(string)

public static EnumInfo? FindEnum(string name)

Parameters

name string

Returns

EnumInfo?

FindLibrary(string)

public static LibraryInfo? FindLibrary(string name)

Parameters

name string

Returns

LibraryInfo?

GetClass(string)

public static ClassInfo GetClass(string name)

Parameters

name string

Returns

ClassInfo

GetComponent<T>()

The component described by the struct T (marked ).

public static ComponentInfo GetComponent<T>() where T : unmanaged

Returns

ComponentInfo

Type Parameters

T

GetEnum(string)

public static EnumInfo GetEnum(string name)

Parameters

name string

Returns

EnumInfo

Register(ClassInfo)

public static void Register(ClassInfo info)

Parameters

info ClassInfo

Register(EnumInfo)

public static void Register(EnumInfo info)

Parameters

info EnumInfo

Register(LibraryInfo)

public static void Register(LibraryInfo info)

Parameters

info LibraryInfo

Register<T>(ComponentInfo)

public static void Register<T>(ComponentInfo info) where T : unmanaged

Parameters

info ComponentInfo

Type Parameters

T

RegisterIfMissing(EnumInfo)

Registers the enum unless one of that name is there: every assembly registers the enums its classes use, including ones another assembly declares.

public static void RegisterIfMissing(EnumInfo info)

Parameters

info EnumInfo