C# Class System.Reflection.TypeFactory

For fast creation of types, useful for creating POCOs
Mostra file Open project: sapiens/cavemantools Class Usage Examples

Public Methods

Method Description
GetFactory ( Type t ) : Func

Gets factory to create instance of type using the public parameterless ctor. Use it when you want to create many instances of the same type in different objects Aprox, 1.3x faster than Activator, almost as fast a manual if you cache and reuse the delegate

Private Methods

Method Description
TypeFactory ( ) : System.Collections.Generic

Method Details

GetFactory() public static method

Gets factory to create instance of type using the public parameterless ctor. Use it when you want to create many instances of the same type in different objects Aprox, 1.3x faster than Activator, almost as fast a manual if you cache and reuse the delegate
public static GetFactory ( Type t ) : Func
t Type
return Func