class TypeDescription

book_4_sparkGenerated
code_blocksInput

Description

The TypeDescription class in the Sandbox namespace provides a comprehensive description of a type. It serves as a wrapper around System.Type to ensure safe interaction with type information. This class is typically returned by the TypeLibrary.

Members

Properties

Member Name Summary
TargetType The type this class describes.
BaseType The base type. This can return null if the type isn't in the type library!
IsValid Whether the class is valid or not, i.e. whether the type still exists.
Members All members (methods, properties, etc) of this type.
DeclaredMembers Members (methods, properties, etc) declared by exactly this type, and not inherited.
Methods All methods of this type.
Properties All properties of this type.
Fields All fields on this type.
IsInterface True if the target type is an interface.
IsEnum True if the target type is an enum.
IsStatic True if the target type is static.
IsClass True if the target type is a class.
IsValueType True if the target type is a value.
IsAbstract Gets a value indicating whether the System.Type is abstract and must be overridden.
Name Name of this type.
Namespace Namespace of this type.
FullName Full name of this type.
Title
Description
Icon
Group
Order
Tags Tags are set via the [Tag] attribute.
Aliases
Identity An integer that represents this type. Based off the class name.
ClassName A string representing this class name. Historically this was provided by [Library( classname )]. If no special name is provided, this will be type.Name.
SourceLine The line number of this member.
SourceFile The file containing this member.
IsGenericType True if we're a generic type.
GenericArguments If we're a generic type this will return our generic parameters.
Interfaces If we implement any interfaces they will be here.

Methods

Member Name Summary
IsNamed Determines if the type has the specified name.
GetAttribute Gets a specific attribute of the type, optionally considering inherited attributes.
GetAttributes Gets all attributes of the type, optionally considering inherited attributes.
HasAttribute Checks if the type has a specific attribute, optionally considering inherited attributes.
HasTag Checks if the type has a specific tag.
GetProperty Gets a property description by name.
GetValue Gets the value of a property from an instance by name.
SetValue Sets the value of a property on an instance by name.
GetMethod Gets a method description by name.
Create Creates an instance of the type with the specified arguments.
CreateGeneric Creates a generic instance of the type with the specified type arguments and arguments.
MakeGenericType Creates a generic type with the specified type arguments.