Types Class

Provides utility methods for type reflection and manipulation, particularly for types used in Oxbind.

C#
public static class Types
Inheritance
Types

Properties

IEnumerableT

Gets the type of IEnumerable<T>.

BindResultT

Gets the type of BindResult<T>.

BindResultImplT

Gets the type of BindResultImpl<T>.

String

Gets the type of string.

Void

Gets the type of void.

BindResultString

Gets the type of BindResult<T> (T is string).

Methods

GetConstructor(Type)

Retrieves the constructor of the specified class that is not annotated with the IgnoredAttribute.

FirstInnerType(Type)

Gets the type of the first type parameter of the specified generic type.

IsRawType(Type, Type)

Gets whether the raw type of the specified type is equal to the specified expected type.

Properties Detail

IEnumerableT

Gets the type of IEnumerable<T>.

C#
public static Type IEnumerableT { get; }

Property Value

BindResultT

Gets the type of BindResult<T>.

C#
public static Type BindResultT { get; }

Property Value

BindResultImplT

Gets the type of BindResultImpl<T>.

C#
public static Type BindResultImplT { get; }

Property Value

String

Gets the type of string.

C#
public static Type String { get; }

Property Value

Void

Gets the type of void.

C#
public static Type Void { get; }

Property Value

BindResultString

Gets the type of BindResult<T> (T is string).

C#
public static Type BindResultString { get; }

Property Value

Methods Detail

GetConstructor(Type)

Retrieves the constructor of the specified class that is not annotated with the IgnoredAttribute.

C#
public static ConstructorInfo GetConstructor(Type clazz)

Parameters

clazz
Type

The type of the class whose constructor is to be retrieved.

Returns

The ConstructorInfo of the constructor that is not annotated with the IgnoredAttribute, or null if no such constructor exists.

FirstInnerType(Type)

Gets the type of the first type parameter of the specified generic type.

C#
public static Type FirstInnerType(Type t)

Parameters

t
Type

The generic type.

Returns

The type of the first type parameter.

IsRawType(Type, Type)

Gets whether the raw type of the specified type is equal to the specified expected type.

C#
public static bool IsRawType(Type type, Type expectedType)

Parameters

type
Type

The generic type.

expectedType
Type

The expected open generic type (e.g., typeof(IEnumerable<>)).

Returns

true if type is a generic type and if its generic type definition equals expectedType, or if type is not a generic type and it equals expectedType; otherwise, false.