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
Показать файл Открыть проект

Открытые методы

Метод Описание
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