Class TypeRef¶
Namespace: Apogee.Reflection
Assembly: Apogee.Reflection.dll
The declared type of a property, parameter or result.
public sealed record TypeRef : IEquatable<TypeRef>
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
TypeRef(ValueKind, bool, string?, TypeRef?)¶
The declared type of a property, parameter or result.
public TypeRef(ValueKind Kind, bool Nullable = false, string? Name = null, TypeRef? Element = null)
Parameters¶
Kind ValueKind
Nullable bool
Name string?
The class or enum name for
Element TypeRef?
The element type of a
Fields¶
Any¶
Any value (
public static readonly TypeRef Any
Field Value¶
Bool¶
public static readonly TypeRef Bool
Field Value¶
Entity¶
public static readonly TypeRef Entity
Field Value¶
Float¶
public static readonly TypeRef Float
Field Value¶
Function¶
public static readonly TypeRef Function
Field Value¶
Int¶
public static readonly TypeRef Int
Field Value¶
Quaternion¶
public static readonly TypeRef Quaternion
Field Value¶
String¶
public static readonly TypeRef String
Field Value¶
Table¶
public static readonly TypeRef Table
Field Value¶
Vector3¶
public static readonly TypeRef Vector3
Field Value¶
Properties¶
Element¶
The element type of a
public TypeRef? Element { get; init; }
Property Value¶
IsAny¶
public bool IsAny { get; }
Property Value¶
Kind¶
public ValueKind Kind { get; init; }
Property Value¶
Name¶
The class or enum name for
public string? Name { get; init; }
Property Value¶
Nullable¶
public bool Nullable { get; init; }
Property Value¶
Methods¶
AsNullable()¶
public TypeRef AsNullable()
Returns¶
Enum(string, bool)¶
public static TypeRef Enum(string enumName, bool nullable = false)
Parameters¶
enumName string
nullable bool
Returns¶
List(TypeRef, bool)¶
public static TypeRef List(TypeRef element, bool nullable = false)
Parameters¶
element TypeRef
nullable bool
Returns¶
Object(string, bool)¶
public static TypeRef Object(string className, bool nullable = false)
Parameters¶
className string
nullable bool
Returns¶
ToString()¶
Returns a string that represents the current object.
public override string ToString()
Returns¶
A string that represents the current object.