C# Class Rock.Reflection

Static helper methods for using Reflection
Afficher le fichier Open project: NewSpring/Rock

Méthodes publiques

Méthode Description
FindType ( Type baseType, string typeName ) : Type

Finds the first matching type in Rock or any of the assemblies that reference Rock

FindTypes ( Type baseType, string typeName = null ) : Type>.SortedDictionary

Finds the all the types that implement or inherit from the baseType. The baseType will not be included in the result

GetCategory ( Type type ) : string

Returns the Category Attribute value for a given type

GetDbContextForEntityType ( Type entityType ) : System.Data.Entity.DbContext

Gets the appropriate DbContext based on the entity type

GetDescription ( Type type ) : string

Returns the Description Attribute value for a given type

GetDisplayName ( Type type ) : string

Returns the DisplayName Attribute value for a given type

GetServiceForEntityType ( Type entityType, System dbContext ) : Rock.Data.IService

Gets the appropriate Rock.Data.IService based on the entity type

SearchAssembly ( Assembly assembly, Type baseType ) : Type>.Dictionary

Searches the assembly.

Method Details

FindType() public static méthode

Finds the first matching type in Rock or any of the assemblies that reference Rock
public static FindType ( Type baseType, string typeName ) : Type
baseType System.Type Type of the base.
typeName string Name of the type.
Résultat System.Type

FindTypes() public static méthode

Finds the all the types that implement or inherit from the baseType. The baseType will not be included in the result
public static FindTypes ( Type baseType, string typeName = null ) : Type>.SortedDictionary
baseType System.Type base type.
typeName string typeName can be specified to filter it to a specific type name
Résultat Type>.SortedDictionary

GetCategory() public static méthode

Returns the Category Attribute value for a given type
public static GetCategory ( Type type ) : string
type System.Type
Résultat string

GetDbContextForEntityType() public static méthode

Gets the appropriate DbContext based on the entity type
public static GetDbContextForEntityType ( Type entityType ) : System.Data.Entity.DbContext
entityType System.Type Type of the Entity.
Résultat System.Data.Entity.DbContext

GetDescription() public static méthode

Returns the Description Attribute value for a given type
public static GetDescription ( Type type ) : string
type System.Type
Résultat string

GetDisplayName() public static méthode

Returns the DisplayName Attribute value for a given type
public static GetDisplayName ( Type type ) : string
type System.Type
Résultat string

GetServiceForEntityType() public static méthode

Gets the appropriate Rock.Data.IService based on the entity type
public static GetServiceForEntityType ( Type entityType, System dbContext ) : Rock.Data.IService
entityType System.Type Type of the Entity.
dbContext System The database context.
Résultat Rock.Data.IService

SearchAssembly() public static méthode

Searches the assembly.
public static SearchAssembly ( Assembly assembly, Type baseType ) : Type>.Dictionary
assembly System.Reflection.Assembly The assembly.
baseType System.Type Type of the base.
Résultat Type>.Dictionary