Class TypeExtensions
Extension methods for System.Type, System.Reflection.TypeInfo, and ITypeInfo.
Inheritance
Inherited Members
Namespace: Kephas.Model
Assembly: Kephas.Core.dll
Syntax
public static class TypeExtensions
Methods
| Improve this Doc View SourceGetAbstractType(ITypeInfo)
Gets the abstract type for an implementation type.
Declaration
public static Type GetAbstractType(this ITypeInfo type)
Parameters
Type | Name | Description |
---|---|---|
ITypeInfo | type | The type to act on. |
Returns
Type | Description |
---|---|
System.Type | The abstract type, or the type itself, if the type is not an implementation type. |
GetAbstractType(Object)
Gets the abstract type for which this instance is an implementation.
Declaration
public static Type GetAbstractType(this object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to act on. |
Returns
Type | Description |
---|---|
System.Type | The abstract type. |
GetAbstractType(Type)
Gets the abstract type for an implementation type.
Declaration
public static Type GetAbstractType(this Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to act on. |
Returns
Type | Description |
---|---|
System.Type | The abstract type, or the type itself, if the type is not an implementation type. |
GetAbstractTypeInfo(ITypeInfo)
Gets the abstract type for an implementation type.
Declaration
public static ITypeInfo GetAbstractTypeInfo(this ITypeInfo type)
Parameters
Type | Name | Description |
---|---|---|
ITypeInfo | type | The type to act on. |
Returns
Type | Description |
---|---|
ITypeInfo | The abstract type, or the type itself, if the type is not an implementation type. |
GetAbstractTypeInfo(Object)
Gets the abstract type for which this instance is an implementation.
Declaration
public static ITypeInfo GetAbstractTypeInfo(this object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to act on. |
Returns
Type | Description |
---|---|
ITypeInfo | The abstract type. |
GetAbstractTypeInfo(Type)
Gets the abstract type for an implementation type.
Declaration
public static ITypeInfo GetAbstractTypeInfo(this Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to act on. |
Returns
Type | Description |
---|---|
ITypeInfo | The abstract type, or the type itself, if the type is not an implementation type. |