C# 클래스 Rock.Data.LinqRuntimeTypeBuilder

Helps create a Type at runtime that can be used when building a dynamic Linq select statement From http://stackoverflow.com/questions/606104/how-to-create-linq-expression-tree-with-anonymous-type-in-it see answer http://stackoverflow.com/a/723018/1755417 The stackoverflow version only defined fields, but our implementation adds Properties
파일 보기 프로젝트 열기: NewSpring/Rock

공개 메소드들

메소드 설명
GetDynamicType ( Type>.Dictionary fields ) : Type

Creates a Type from a list of fields and their type then returns that Type

GetDynamicType ( IEnumerable fields ) : Type

Creates a Type from a list of field PropertyInfos then returns that type

비공개 메소드들

메소드 설명
GetTypeKey ( Type>.Dictionary fields ) : string

Gets the type key which can be used to look in our cache of builtTypes

GetTypeKey ( IEnumerable fields ) : string

Gets the type key which can be used to look in our cache of builtTypes

LinqRuntimeTypeBuilder ( ) : System

Initializes the LinqRuntimeTypeBuilder class.

메소드 상세

GetDynamicType() 공개 정적인 메소드

Creates a Type from a list of fields and their type then returns that Type
fields fields;fields must have at least 1 field definition
public static GetDynamicType ( Type>.Dictionary fields ) : Type
fields Type>.Dictionary The fields.
리턴 System.Type

GetDynamicType() 공개 정적인 메소드

Creates a Type from a list of field PropertyInfos then returns that type
public static GetDynamicType ( IEnumerable fields ) : Type
fields IEnumerable The fields.
리턴 System.Type