TypeExtensions

Extension methods for System.Type in the editor context. Provides a convenience accessor for Paragon's TypeTree type hierarchy system.

Definition

Namespace: Paragon.Editor Assembly: Editor assembly

public static class TypeExtensions

Quick Lookup

Goal
Method

Get type hierarchy tree

typeof(MyClass).GetTypeTree()

Methods

GetTypeTree

Returns a TypeTree representing the type hierarchy rooted at the given type. Delegates to the static TypeTree.GetTypeTree(Type) method.

public static TypeTree GetTypeTree(this Type type)
Parameter
Type
Description

type

Type

The type to build the hierarchy tree for

Returns: TypeTree — a cached type hierarchy structure for the given type.

circle-info

TypeTree is a Paragon Editor utility class that uses TypeCache.GetTypesDerivedFrom() to build and cache type hierarchies. The GetTypeTree static method returns a cached instance, so repeated calls for the same type are efficient.

Examples

Getting a type hierarchy

See Also

Last updated