Class TypeExtensions
Inheritance
object
TypeExtensions
Namespace: TetraCreations.Core
Assembly: cs.temp.dll.dll
Syntax
public static class TypeExtensions
Methods
GetMethod(Type, string)
Returns the MethodInfo using the method name
Declaration
public static MethodInfo GetMethod(this Type type, string name)
Parameters
Type |
Name |
Description |
Type |
type |
|
string |
name |
Method name
|
Returns
Type |
Description |
MethodInfo |
|
GetTypeName(Type)
Get the type name for the asset database if it's from the Engine, otherwise return the FullName
Declaration
public static string GetTypeName(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
HasFlagsAttribute(Type)
Determines whether an Enum type has the [Flags] attribute
Declaration
public static bool HasFlagsAttribute(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
Implements(Type, Type)
Determines whether a type implements an interface.
Declaration
public static bool Implements(this Type source, Type interfaceType)
Parameters
Type |
Name |
Description |
Type |
source |
|
Type |
interfaceType |
|
Returns
Implements<T>(Type)
Determines whether a type implements an interface.
Declaration
public static bool Implements<T>(this Type source)
Parameters
Type |
Name |
Description |
Type |
source |
|
Returns
Type Parameters
Name |
Description |
T |
The interface Type
|
IsAnonymous(Type)
Declaration
public static bool IsAnonymous(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsCompilerGenerated(Type)
Determines whether a Type is a compiler-generated element.
Declaration
public static bool IsCompilerGenerated(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsEnum(Type)
Determines whether the Type is an enum
Declaration
public static bool IsEnum(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsFromUnity(Type)
Determines if the type is from the UnityEngine or UnityEditor namespaces
Declaration
public static bool IsFromUnity(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsFromUnityEditor(Type)
Determines if the type is from the UnityEditor namespace
Declaration
public static bool IsFromUnityEditor(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsFromUnityEngine(Type)
Determines if the type is from the UnityEngine namespace
Declaration
public static bool IsFromUnityEngine(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsImplementedBy(Type, Type)
Determines whether a type implements another
Declaration
public static bool IsImplementedBy(this Type type, Type other)
Parameters
Type |
Name |
Description |
Type |
type |
|
Type |
other |
|
Returns