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¶
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¶
Components¶
public static IReadOnlyList<ComponentInfo> Components { get; }
Property Value¶
Enums¶
public static IReadOnlyList<EnumInfo> Enums { get; }
Property Value¶
Libraries¶
public static IReadOnlyList<LibraryInfo> Libraries { get; }
Property Value¶
Methods¶
FindClass(string)¶
public static ClassInfo? FindClass(string name)
Parameters¶
name string
Returns¶
FindComponent(string)¶
public static ComponentInfo? FindComponent(string name)
Parameters¶
name string
Returns¶
FindEnum(string)¶
public static EnumInfo? FindEnum(string name)
Parameters¶
name string
Returns¶
FindLibrary(string)¶
public static LibraryInfo? FindLibrary(string name)
Parameters¶
name string
Returns¶
GetClass(string)¶
public static ClassInfo GetClass(string name)
Parameters¶
name string
Returns¶
GetComponent<T>()¶
The component described by the struct T (marked
public static ComponentInfo GetComponent<T>() where T : unmanaged
Returns¶
Type Parameters¶
T
GetEnum(string)¶
public static EnumInfo GetEnum(string name)
Parameters¶
name string
Returns¶
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