Class TypeExtensions
Contains Type extension methods for better support of generics.
Inheritance
Inherited Members
Namespace: Existential
Assembly: Existential.Net.dll
Syntax
public static class TypeExtensions
Methods
View SourceGetGenericAwareFullTypeName(Type)
Gets the full name of the type, including any generic type parameters.
Declaration
public static string GetGenericAwareFullTypeName(this Type inType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | inType | The type for which to get the full name. |
Returns
Type | Description |
---|---|
System.String | The full name of the type, including any generic type parameters. |
GetGenericAwareFullTypeName<T>(T)
Gets the full name of the type, including any generic type parameters.
Declaration
public static string GetGenericAwareFullTypeName<T>(this T inInstance)
Parameters
Type | Name | Description |
---|---|---|
T | inInstance | The instance for which to get the type name. |
Returns
Type | Description |
---|---|
System.String | The full name of the type, including any generic type parameters. |
Type Parameters
Name | Description |
---|---|
T | The type of the instance (will be inferred). |
GetGenericAwareTypeName(Type)
Gets the name of the type, including any generic type parameters.
Declaration
public static string GetGenericAwareTypeName(this Type inType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | inType | The type for which to get the name. |
Returns
Type | Description |
---|---|
System.String | The name of the type, including any generic type parameters. |
GetGenericAwareTypeName<T>(T)
Gets the name of the type, including any generic type parameters.
Declaration
public static string GetGenericAwareTypeName<T>(this T inInstance)
Parameters
Type | Name | Description |
---|---|---|
T | inInstance | The instance for which to get the type name. |
Returns
Type | Description |
---|---|
System.String | The name of the type, including any generic type parameters. |
Type Parameters
Name | Description |
---|---|
T | The type of the instance (will be inferred). |
IsInstanceOfType<T>(T, Type)
Determines whether this type is of the expected type.
Declaration
public static bool IsInstanceOfType<T>(this T inInstance, Type inExpectedType)
Parameters
Type | Name | Description |
---|---|---|
T | inInstance | The instance to compare with the expected type. |
System.Type | inExpectedType | The expected type. |
Returns
Type | Description |
---|---|
System.Boolean | True if the types are same; otherwise false. |
Type Parameters
Name | Description |
---|---|
T | The type being extended. |