C# 클래스 FrameDAL.Utility.ReflectionExtensions

파일 보기 프로젝트 열기: vincentlauvlwj/FrameDAL

공개 메소드들

메소드 설명
GetCachedProperties ( this type ) : System.Reflection.PropertyInfo[]

从缓存中获得类的所有属性

GetColumnAttribute ( this prop ) : ColumnAttribute

从缓存中获取属性的Column特性类对象

GetIdAttribute ( this prop ) : IdAttribute

从缓存中获取属性的Id特性类对象

GetIdProperty ( this type ) : PropertyInfo

从缓存中获取类的ID属性,ID属性是指添加了Id特性的属性

GetManyToManyAttribute ( this prop ) : ManyToManyAttribute
GetManyToOneAttribute ( this prop ) : ManyToOneAttribute
GetOneToManyAttribute ( this prop ) : OneToManyAttribute
GetTableAttribute ( this type ) : TableAttribute

获取缓存中的Table特性类对象

GetValue ( this member, object instance ) : object
SetValue ( this member, object instance, object value ) : void
SetValueSafely ( this prop, object entity, object value ) : void

安全设置实体属性的值

메소드 상세

GetCachedProperties() 공개 정적인 메소드

从缓存中获得类的所有属性
type为null 该类中没有任何公开属性
public static GetCachedProperties ( this type ) : System.Reflection.PropertyInfo[]
type this 要获取属性的类
리턴 System.Reflection.PropertyInfo[]

GetColumnAttribute() 공개 정적인 메소드

从缓存中获取属性的Column特性类对象
type为null 该属性的Column特性没有正确配置
public static GetColumnAttribute ( this prop ) : ColumnAttribute
prop this 要获取特性的属性
리턴 FrameDAL.Attributes.ColumnAttribute

GetIdAttribute() 공개 정적인 메소드

从缓存中获取属性的Id特性类对象
type为null 该属性的Id特性没有正确配置
public static GetIdAttribute ( this prop ) : IdAttribute
prop this 要获取特性的属性
리턴 FrameDAL.Attributes.IdAttribute

GetIdProperty() 공개 정적인 메소드

从缓存中获取类的ID属性,ID属性是指添加了Id特性的属性
该类没有配置ID属性 type为null 该类的Id特性没有正确配置
public static GetIdProperty ( this type ) : PropertyInfo
type this 要获取ID属性的类
리턴 System.Reflection.PropertyInfo

GetManyToManyAttribute() 공개 정적인 메소드

public static GetManyToManyAttribute ( this prop ) : ManyToManyAttribute
prop this
리턴 FrameDAL.Attributes.ManyToManyAttribute

GetManyToOneAttribute() 공개 정적인 메소드

public static GetManyToOneAttribute ( this prop ) : ManyToOneAttribute
prop this
리턴 FrameDAL.Attributes.ManyToOneAttribute

GetOneToManyAttribute() 공개 정적인 메소드

public static GetOneToManyAttribute ( this prop ) : OneToManyAttribute
prop this
리턴 FrameDAL.Attributes.OneToManyAttribute

GetTableAttribute() 공개 정적인 메소드

获取缓存中的Table特性类对象
该类没有添加Table特性,或者Table.Name属性为空或空白字符串 type为null
public static GetTableAttribute ( this type ) : TableAttribute
type this 要获取特性的类
리턴 FrameDAL.Attributes.TableAttribute

GetValue() 공개 정적인 메소드

public static GetValue ( this member, object instance ) : object
member this
instance object
리턴 object

SetValue() 공개 정적인 메소드

public static SetValue ( this member, object instance, object value ) : void
member this
instance object
value object
리턴 void

SetValueSafely() 공개 정적인 메소드

安全设置实体属性的值
public static SetValueSafely ( this prop, object entity, object value ) : void
prop this 属性
entity object 要设置属性值的实体
value object
리턴 void