C# 클래스 Rock.Reflection

Static helper methods for using Reflection
파일 보기 프로젝트 열기: NewSpring/Rock

공개 메소드들

메소드 설명
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.

메소드 상세

FindType() 공개 정적인 메소드

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.
리턴 System.Type

FindTypes() 공개 정적인 메소드

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
리턴 Type>.SortedDictionary

GetCategory() 공개 정적인 메소드

Returns the Category Attribute value for a given type
public static GetCategory ( Type type ) : string
type System.Type
리턴 string

GetDbContextForEntityType() 공개 정적인 메소드

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.
리턴 System.Data.Entity.DbContext

GetDescription() 공개 정적인 메소드

Returns the Description Attribute value for a given type
public static GetDescription ( Type type ) : string
type System.Type
리턴 string

GetDisplayName() 공개 정적인 메소드

Returns the DisplayName Attribute value for a given type
public static GetDisplayName ( Type type ) : string
type System.Type
리턴 string

GetServiceForEntityType() 공개 정적인 메소드

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.
리턴 Rock.Data.IService

SearchAssembly() 공개 정적인 메소드

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.
리턴 Type>.Dictionary