Enhanced C#
Loyc library documentation
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Nested classes | Static Public Member Functions | List of all members
Loyc.TypeExt Class Reference

Extension methods for Type. More...


Source file:

Remarks

Extension methods for Type.

Static Public Member Functions

static string NameWithGenericArgs (this Type type)
 Returns the type with generic parameters in C# style, e.g. typeof(List<List<string>>.NameWithGenericArgs() returns List<List<String>>. More...
 
static bool IsPrimitiveInteger (this RuntimeTypeHandle h)
 
static bool IsPrimitiveFloat (this RuntimeTypeHandle h)
 
static bool IsPrimitiveNumeric (this RuntimeTypeHandle h)
 
static IReadOnlyList< Type > GetInterfacesSortedTopologically (this Type type)
 Gets a list of the interfaces that the specified type implements, sorted topologically so that the highest-level interfaces are listed first. Note: TypeTraits{T}.Interfaces provides the same information memoized, for fast repeated access. More...
 
static IReadOnlyList< Type > SortWithBaseInterfacesTopologically (params Type[] startingTypes)
 Gets the base interfaces of the specified types and sorts all the types (including those provided) topologically, with the highest-level types first. More...
 

Member Function Documentation

static IReadOnlyList<Type> Loyc.TypeExt.GetInterfacesSortedTopologically ( this Type  type)
inlinestatic

Gets a list of the interfaces that the specified type implements, sorted topologically so that the highest-level interfaces are listed first. Note: TypeTraits{T}.Interfaces provides the same information memoized, for fast repeated access.

Parameters
type
static string Loyc.TypeExt.NameWithGenericArgs ( this Type  type)
inlinestatic

Returns the type with generic parameters in C# style, e.g. typeof(List<List<string>>.NameWithGenericArgs() returns List<List<String>>.

static IReadOnlyList<Type> Loyc.TypeExt.SortWithBaseInterfacesTopologically ( params Type[]  startingTypes)
inlinestatic

Gets the base interfaces of the specified types and sorts all the types (including those provided) topologically, with the highest-level types first.