C# Class Hypermedia.TypeHelper

Afficher le fichier Open project: cosullivan/Hypermedia

Méthodes publiques

Méthode Description
GetCollectionType ( Type type ) : Type

Gets the underlying ICollection type.

GetCollectionType ( TypeInfo type ) : Type

Gets the underlying ICollection type.

GetEnumerableType ( Type type ) : Type

Gets the underlying IEnumerable type.

GetUnderlyingType ( Type type ) : Type

Gets the underlying element type.

GetUnderlyingType ( TypeInfo type ) : Type

Gets the underlying element type.

IsCollection ( Type type ) : bool

Returns a value indicating whether or not the type is an ICollection.

IsEnumerable ( Type type ) : bool

Returns a value indicating whether or not the given type is an IEnumerable type.

IsList ( Type type ) : bool

Returns a value indicating whether or no the given type is an IList.

IsList ( TypeInfo type ) : bool

Returns a value indicating whether or no the given type is an IList.

IsReferenceType ( Type type ) : bool

Returns a value indicating whether or not he given type is to be considered a reference type.

TryGetCollectionType ( Type type, Type &collectionType ) : bool

Attempt to get the ICollection type from the given base type.

TryGetCollectionType ( TypeInfo type, Type &collectionType ) : bool

Attempt to get the ICollection type from the given base type.

TryGetEnumerableType ( Type type, Type &enumerableType ) : bool

Attempt to get the IEnumerable type from the given base type.

Private Methods

Méthode Description
GetEnumerableType ( TypeInfo type ) : Type

Gets the underlying IEnumerable type.

TryGetEnumerableType ( TypeInfo type, Type &enumerableType ) : bool

Attempt to get the IEnumerable type from the given base type.

Method Details

GetCollectionType() public static méthode

Gets the underlying ICollection type.
public static GetCollectionType ( Type type ) : Type
type System.Type The type to extract the underlying collection type (if any).
Résultat System.Type

GetCollectionType() public static méthode

Gets the underlying ICollection type.
public static GetCollectionType ( TypeInfo type ) : Type
type System.Reflection.TypeInfo The type to extract the underlying collection type (if any).
Résultat System.Type

GetEnumerableType() public static méthode

Gets the underlying IEnumerable type.
public static GetEnumerableType ( Type type ) : Type
type System.Type The type to extract the underlying enumerable type (if any).
Résultat System.Type

GetUnderlyingType() public static méthode

Gets the underlying element type.
public static GetUnderlyingType ( Type type ) : Type
type System.Type The type to extract the underlying type (if any).
Résultat System.Type

GetUnderlyingType() public static méthode

Gets the underlying element type.
public static GetUnderlyingType ( TypeInfo type ) : Type
type System.Reflection.TypeInfo The type to extract the underlying type (if any).
Résultat System.Type

IsCollection() public static méthode

Returns a value indicating whether or not the type is an ICollection.
public static IsCollection ( Type type ) : bool
type System.Type The type to test against.
Résultat bool

IsEnumerable() public static méthode

Returns a value indicating whether or not the given type is an IEnumerable type.
public static IsEnumerable ( Type type ) : bool
type System.Type The type to test against.
Résultat bool

IsList() public static méthode

Returns a value indicating whether or no the given type is an IList.
public static IsList ( Type type ) : bool
type System.Type The type to check for the prescence of IList.
Résultat bool

IsList() public static méthode

Returns a value indicating whether or no the given type is an IList.
public static IsList ( TypeInfo type ) : bool
type System.Reflection.TypeInfo The type to check for the prescence of IList.
Résultat bool

IsReferenceType() public static méthode

Returns a value indicating whether or not he given type is to be considered a reference type.
public static IsReferenceType ( Type type ) : bool
type System.Type The type to check whether it is a reference type.
Résultat bool

TryGetCollectionType() public static méthode

Attempt to get the ICollection type from the given base type.
public static TryGetCollectionType ( Type type, Type &collectionType ) : bool
type System.Type The base type info to get the collection type from.
collectionType System.Type The collection type for the given base type.
Résultat bool

TryGetCollectionType() public static méthode

Attempt to get the ICollection type from the given base type.
public static TryGetCollectionType ( TypeInfo type, Type &collectionType ) : bool
type System.Reflection.TypeInfo The base type info to get the collection type from.
collectionType System.Type The collection type for the given base type.
Résultat bool

TryGetEnumerableType() public static méthode

Attempt to get the IEnumerable type from the given base type.
public static TryGetEnumerableType ( Type type, Type &enumerableType ) : bool
type System.Type The base type info to get the enumerable type from.
enumerableType System.Type The enumerable type for the given base type.
Résultat bool