Types Class
Provides methods to convert a type to another type, or to the object associated with the type.
public static class Types
- Inheritance
-
Types
Properties
IEnumerable |
Gets the type of IEnumerable<T>. |
Bind |
Gets the type of BindEvent<T>. |
Bind |
Gets the type of BindEventImpl<T>. |
String |
Gets the type of string. |
Void |
Gets the type of void. |
Bind |
Gets the type of BindEvent<T> ( |
Methods
Placeholder |
Returns the placeholder type of the specified type. |
First |
Gets the type of the first type parameter of the specified generic type. |
Is |
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>.
public static Type IEnumerableT { get; }
Property Value
BindEventT
Gets the type of BindEvent<T>.
public static Type BindEventT { get; }
Property Value
BindEventImplT
Gets the type of BindEventImpl<T>.
public static Type BindEventImplT { get; }
Property Value
String
Gets the type of string.
public static Type String { get; }
Property Value
Void
Gets the type of void.
public static Type Void { get; }
Property Value
BindEventString
Gets the type of BindEvent<T> (T
is
string
).
public static Type BindEventString { get; }
Property Value
Methods Detail
PlaceholderType(Type)
Returns the placeholder type of the specified type.
public static Type PlaceholderType(Type t)
Parameters
- t
- Type
The type.
Returns
The placeholder type.
FirstInnerType(Type)
Gets the type of the first type parameter of the specified generic type.
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.
public static bool IsRawType(Type type, Type expectedType)
Parameters
- type
- Type
The generic type.
- expectedType
- Type
The expected type, which is the generic type definition of the
type
.
Returns
true
if type
is generic type
and if its generic type definition equals to
expectedType
, or if type
is not generic type and it equals equals to
expectedType
. false
otherwise.