Interface
UnionTypeInfo
sealed interface UnionTypeInfo
Module: System.Introspection
Assembly: System.Runtime.dll
Source file: Descriptors.rvn
Inherits: TypeInfo
Closed hierarchy: only the permitted direct subtypes can extend this type.
Permitted direct subtypes: RuntimeUnionTypeInfo
Part of closed hierarchy: TypeInfo
A structural union, accepting any one of its constituent types.
Properties
25 items
BaseType: Optional<TypeInfo>
Gets the declared base type, or None when there is no base type.
Inherited from TypeInfo.BaseType · Defined by TypeInfo.BaseType · Required implementation (no default).
ContainsGenericParameters: bool
Recursively tests unbound parameters, including element and structural types.
Inherited from TypeInfo.ContainsGenericParameters · Defined by TypeInfo.ContainsGenericParameters · Required implementation (no default).
DisplayName: string
Gets diagnostic text describing the represented type or structural shape.
Inherited from TypeInfo.DisplayName · Defined by TypeInfo.DisplayName · Required implementation (no default).
GenericArgumentCount: int
Gets the number of generic arguments.
Inherited from TypeInfo.GenericArgumentCount · Defined by TypeInfo.GenericArgumentCount · Required implementation (no default).
IsAbstract: bool
Tests whether the represented type is abstract.
Inherited from TypeInfo.IsAbstract · Defined by TypeInfo.IsAbstract · Required implementation (no default).
IsArray: bool
Tests whether this describes an array.
Inherited from TypeInfo.IsArray · Defined by TypeInfo.IsArray · Required implementation (no default).
IsBeforeFieldInit: bool
Whether initialization uses relaxed first-static-field-access timing.
Inherited from TypeInfo.IsBeforeFieldInit · Defined by TypeInfo.IsBeforeFieldInit · Required implementation (no default).
IsByRef: bool
Tests whether this describes a managed reference.
Inherited from TypeInfo.IsByRef · Defined by TypeInfo.IsByRef · Required implementation (no default).
IsClosedHierarchy: bool
Tests whether the represented declaration defines a closed family of direct derived types or implementations.
Inherited from TypeInfo.IsClosedHierarchy · Defined by TypeInfo.IsClosedHierarchy · Required implementation (no default).
IsConstructedGenericType: bool
True for a constructed nominal generic identity, whether open or closed.
Inherited from TypeInfo.IsConstructedGenericType · Defined by TypeInfo.IsConstructedGenericType · Required implementation (no default).
IsEnum: bool
Tests whether this describes an enum.
Inherited from TypeInfo.IsEnum · Defined by TypeInfo.IsEnum · Required implementation (no default).
IsFunctionType: bool
Gets whether the represented type is a structural Function signature.
Inherited from TypeInfo.IsFunctionType · Defined by TypeInfo.IsFunctionType · Required implementation (no default).
IsGenericParameter: bool
True when this identity is an unbound generic parameter.
Inherited from TypeInfo.IsGenericParameter · Defined by TypeInfo.IsGenericParameter · Required implementation (no default).
IsGenericType: bool
True for a nominal generic definition or constructed nominal generic type.
Inherited from TypeInfo.IsGenericType · Defined by TypeInfo.IsGenericType · Required implementation (no default).
IsGenericTypeDefinition: bool
True when this identity is the declaration with its own unbound parameters.
Inherited from TypeInfo.IsGenericTypeDefinition · Defined by TypeInfo.IsGenericTypeDefinition · Required implementation (no default).
IsInterface: bool
Tests whether this describes an interface.
Inherited from TypeInfo.IsInterface · Defined by TypeInfo.IsInterface · Required implementation (no default).
IsNominalType: bool
Tests whether this descriptor implements NominalTypeInfo and represents a nominal declaration or its construction.
Inherited from TypeInfo.IsNominalType · Defined by TypeInfo.IsNominalType · Required implementation (no default).
IsOpen: bool
Tests whether the represented class or interface permits unrestricted inheritance or implementation.
Inherited from TypeInfo.IsOpen · Defined by TypeInfo.IsOpen · Required implementation (no default).
IsPointer: bool
Tests whether this describes an unmanaged pointer.
Inherited from TypeInfo.IsPointer · Defined by TypeInfo.IsPointer · Required implementation (no default).
IsReadOnly: bool
Tests whether the represented reference is read-only.
Inherited from TypeInfo.IsReadOnly · Defined by TypeInfo.IsReadOnly · Required implementation (no default).
IsUnion: bool
Tests whether the represented type has structural union identity.
Inherited from TypeInfo.IsUnion · Defined by TypeInfo.IsUnion · Required implementation (no default).
IsValueType: bool
Tests whether the represented type has value semantics.
Inherited from TypeInfo.IsValueType · Defined by TypeInfo.IsValueType · Required implementation (no default).
IsVisible: bool
Whether this type is publicly visible outside its defining assembly.
Inherited from TypeInfo.IsVisible · Defined by TypeInfo.IsVisible · Required implementation (no default).
TypeInitializer: Optional<ConstructorInfo>
Describes the runtime-owned initializer without executing it.
Inherited from TypeInfo.TypeInitializer · Defined by TypeInfo.TypeInitializer · Required implementation (no default).
Types: Sequence<TypeInfo>
Direct constituent types in normalized signature order.
Defined by UnionTypeInfo.Types · Required implementation (no default).
Methods
26 items
AssignableFrom(source: TypeInfo) -> bool
Returns whether source can be assigned to a variable of this type.
Inherited from TypeInfo.AssignableFrom · Defined by TypeInfo.AssignableFrom · Required implementation (no default).
AssignableTo(target: TypeInfo) -> bool
Returns whether this type can be assigned to a variable of target's type.
Inherited from TypeInfo.AssignableTo · Defined by TypeInfo.AssignableTo · Required implementation (no default).
Extension member:
CreateInstance(arguments: ...object?[]) -> Result<object, ReflectionError>
Creates the described type using a matching public constructor.
Extension from TypeReflectionExtensions.CreateInstance
Extension member:
CreateInstance() -> Result<object, ReflectionError>
Invokes the public parameterless constructor of a concrete nongeneric reference class.
Extension from TypeReflectionExtensions.CreateInstance
Extension member:
CreateInstance<T>(arguments: ...object?[]) -> Result<T, ReflectionError>
Creates the described type and returns a compatible T view.
Extension from TypeReflectionExtensions.CreateInstance
Equals(other: TypeInfo) -> bool
Compares represented type identity with another TypeInfo.
Inherited from TypeInfo.Equals · Defined by TypeInfo.Equals · Required implementation (no default).
GetConstructors() -> Sequence<ConstructorInfo>
Gets declared public instance constructor descriptions.
Inherited from TypeInfo.GetConstructors · Defined by TypeInfo.GetConstructors · Required implementation (no default).
GetConstructors(flags: BindingFlags) -> Sequence<ConstructorInfo>
Gets declared constructors matching explicit visibility and instance/static flags.
Inherited from TypeInfo.GetConstructors · Defined by TypeInfo.GetConstructors · Required implementation (no default).
GetElementType() -> Optional<TypeInfo>
Gets the element of an array, pointer or reference shape.
Inherited from TypeInfo.GetElementType · Defined by TypeInfo.GetElementType · Required implementation (no default).
GetEnumNames() -> Sequence<string>
Gets names declared by the represented enum.
Inherited from TypeInfo.GetEnumNames · Defined by TypeInfo.GetEnumNames · Required implementation (no default).
GetEnumUnderlyingType() -> TypeInfo
Gets the underlying integer type of an enum.
Inherited from TypeInfo.GetEnumUnderlyingType · Defined by TypeInfo.GetEnumUnderlyingType · Required implementation (no default).
GetEnumValues() -> Sequence<object>
Gets declared enum values in unsigned underlying-value order.
Inherited from TypeInfo.GetEnumValues · Defined by TypeInfo.GetEnumValues · Required implementation (no default).
GetFields() -> Sequence<FieldInfo>
Gets public instance and static fields.
Inherited from TypeInfo.GetFields · Defined by TypeInfo.GetFields · Required implementation (no default).
GetFields(flags: BindingFlags) -> Sequence<FieldInfo>
Gets fields selected by binding flags.
Inherited from TypeInfo.GetFields · Defined by TypeInfo.GetFields · Required implementation (no default).
GetGenericArgument(index: int) -> TypeInfo
Gets a generic argument by index.
Inherited from TypeInfo.GetGenericArgument · Defined by TypeInfo.GetGenericArgument · Required implementation (no default).
GetGenericArguments() -> Sequence<TypeInfo>
Gets the represented generic arguments.
Inherited from TypeInfo.GetGenericArguments · Defined by TypeInfo.GetGenericArguments · Required implementation (no default).
GetGenericTypeDefinition() -> TypeInfo
Returns the source declaration for this nominal generic type; faults for nongeneric types.
Inherited from TypeInfo.GetGenericTypeDefinition · Defined by TypeInfo.GetGenericTypeDefinition · Required implementation (no default).
GetInterfaces() -> Sequence<TypeInfo>
Gets the implemented interface descriptors.
Inherited from TypeInfo.GetInterfaces · Defined by TypeInfo.GetInterfaces · Required implementation (no default).
GetMethods() -> Sequence<MethodInfo>
Describes declared methods, including generic definitions and open owner signatures.
Inherited from TypeInfo.GetMethods · Defined by TypeInfo.GetMethods · Required implementation (no default).
GetMethods(flags: BindingFlags) -> Sequence<MethodInfo>
Gets methods selected by binding flags.
Inherited from TypeInfo.GetMethods · Defined by TypeInfo.GetMethods · Required implementation (no default).
GetProperties() -> Sequence<PropertyInfo>
Gets public instance and static properties.
Inherited from TypeInfo.GetProperties · Defined by TypeInfo.GetProperties · Required implementation (no default).
GetProperties(flags: BindingFlags) -> Sequence<PropertyInfo>
Gets properties selected by binding flags.
Inherited from TypeInfo.GetProperties · Defined by TypeInfo.GetProperties · Required implementation (no default).
IsInstanceOfType(value: object?) -> bool
Returns whether a non-null value can be assigned to a variable of this type.
Inherited from TypeInfo.IsInstanceOfType · Defined by TypeInfo.IsInstanceOfType · Required implementation (no default).
IsSubclassOf(target: TypeInfo) -> bool
Returns whether this type strictly derives from target; interfaces are excluded.
Inherited from TypeInfo.IsSubclassOf · Defined by TypeInfo.IsSubclassOf · Required implementation (no default).
MakeArrayType() -> TypeInfo
Returns the zero-based vector type with this element type, without allocating an array. Invalid elements and unavailable native array shapes cause a runtime fault.
Inherited from TypeInfo.MakeArrayType · Defined by TypeInfo.MakeArrayType · Required implementation (no default).
MakeGenericType(arguments: Sequence<TypeInfo>) -> Result<TypeInfo, GenericTypeError>
Constructs a closed nominal identity; native execution requires its retention.
Inherited from TypeInfo.MakeGenericType · Defined by TypeInfo.MakeGenericType · Required implementation (no default).