C# Class MefContrib.Hosting.Conventions.TypeExtensions

Contains extension methods for the Type type.
Mostrar archivo Open project: ipasoftware/MefContrib

Public Methods

Method Description
GetActualType ( this type ) : Type
GetAllInstanceFields ( this source ) : System.Reflection.FieldInfo[]
GetAllInstanceProperties ( this source ) : System.Reflection.PropertyInfo[]
GetAllStaticFields ( this source ) : System.Reflection.FieldInfo[]
GetAllStaticProperties ( this source ) : System.Reflection.PropertyInfo[]
GetGreediestConstructor ( this type ) : ConstructorInfo
GetRequiredMetadata ( this source ) : IEnumerable
HasDefaultConstructor ( this self ) : bool
IsCollection ( this type ) : bool

Checks if the Type implements the ICollection interface.

IsEnumerable ( this type ) : bool

Checks if the Type implements the IEnumerable interface.

The method will return for string type.

Method Details

GetActualType() public static method

public static GetActualType ( this type ) : Type
type this
return System.Type

GetAllInstanceFields() public static method

public static GetAllInstanceFields ( this source ) : System.Reflection.FieldInfo[]
source this
return System.Reflection.FieldInfo[]

GetAllInstanceProperties() public static method

public static GetAllInstanceProperties ( this source ) : System.Reflection.PropertyInfo[]
source this
return System.Reflection.PropertyInfo[]

GetAllStaticFields() public static method

public static GetAllStaticFields ( this source ) : System.Reflection.FieldInfo[]
source this
return System.Reflection.FieldInfo[]

GetAllStaticProperties() public static method

public static GetAllStaticProperties ( this source ) : System.Reflection.PropertyInfo[]
source this
return System.Reflection.PropertyInfo[]

GetGreediestConstructor() public static method

public static GetGreediestConstructor ( this type ) : ConstructorInfo
type this
return System.Reflection.ConstructorInfo

GetRequiredMetadata() public static method

public static GetRequiredMetadata ( this source ) : IEnumerable
source this
return IEnumerable

HasDefaultConstructor() public static method

public static HasDefaultConstructor ( this self ) : bool
self this
return bool

IsCollection() public static method

Checks if the Type implements the ICollection interface.
public static IsCollection ( this type ) : bool
type this The to inspect.
return bool

IsEnumerable() public static method

Checks if the Type implements the IEnumerable interface.
The method will return for string type.
public static IsEnumerable ( this type ) : bool
type this The to inspect.
return bool