C# Class JPB.DataAccess.DbInfoConfig.FactoryHelper

Only for internal use
Mostrar archivo Open project: JPVenson/DataAccess

Public Methods

Method Description
CreateShortCodeTypeReference ( Type type, CodeNamespaceImportCollection imports ) : CodeTypeReference
GenerateBody ( DbClassInfoCache sourceType, FactoryHelperSettings settings, CodeNamespace importNameSpace, CodeMemberMethod container, System.CodeDom.CodeExpression target ) : void
GenerateBody ( DbPropertyInfoCache>.Dictionary properties, FactoryHelperSettings settings, CodeNamespace importNameSpace, CodeMemberMethod container, System.CodeDom.CodeExpression target ) : void

Creates a new body in stlye of an Ado.net Constructor and attaches it to the target

GenerateConstructor ( DbClassInfoCache target, FactoryHelperSettings settings, CodeNamespace importNameSpace ) : CodeMemberMethod

Generates a Constructor with a Full Ado.Net constructor

GenerateFactory ( DbClassInfoCache target, FactoryHelperSettings settings, CodeNamespace importNameSpace ) : CodeMemberMethod

Generates a Function with a Full ado.net constructor beavior. It Creates a new Instance of and then fills all public properties

GenerateTypeConstructor ( IEnumerable propertyToDbColumn, string altNamespace ) : CodeMemberMethod
GenerateTypeConstructor ( bool factory = false ) : CodeMemberMethod

Creates a new CodeDOM Element that is ether a Factory(Public Static Object Factory) or an constructor Both functions accepts only one Argument of type IDataRecord Both functions are empty

Shortify ( CodeTypeReference typeReference, Type type, CodeNamespaceImportCollection imports ) : void

Private Methods

Method Description
CompileNewType ( string name ) : Type
CreateFactory ( DbClassInfoCache target, FactoryHelperSettings settings ) : object>.Func
GetTypeBuilder ( string name ) : TypeBuilder
debug ( CodeCompileUnit cp ) : string

Method Details

CreateShortCodeTypeReference() public static method

public static CreateShortCodeTypeReference ( Type type, CodeNamespaceImportCollection imports ) : CodeTypeReference
type System.Type
imports System.CodeDom.CodeNamespaceImportCollection
return System.CodeDom.CodeTypeReference

GenerateBody() public static method

public static GenerateBody ( DbClassInfoCache sourceType, FactoryHelperSettings settings, CodeNamespace importNameSpace, CodeMemberMethod container, System.CodeDom.CodeExpression target ) : void
sourceType DbClassInfoCache
settings FactoryHelperSettings
importNameSpace System.CodeDom.CodeNamespace
container System.CodeDom.CodeMemberMethod
target System.CodeDom.CodeExpression
return void

GenerateBody() public static method

Creates a new body in stlye of an Ado.net Constructor and attaches it to the target
public static GenerateBody ( DbPropertyInfoCache>.Dictionary properties, FactoryHelperSettings settings, CodeNamespace importNameSpace, CodeMemberMethod container, System.CodeDom.CodeExpression target ) : void
properties DbPropertyInfoCache>.Dictionary
settings FactoryHelperSettings
importNameSpace System.CodeDom.CodeNamespace
container System.CodeDom.CodeMemberMethod
target System.CodeDom.CodeExpression
return void

GenerateConstructor() public static method

Generates a Constructor with a Full Ado.Net constructor
public static GenerateConstructor ( DbClassInfoCache target, FactoryHelperSettings settings, CodeNamespace importNameSpace ) : CodeMemberMethod
target DbClassInfoCache
settings FactoryHelperSettings
importNameSpace System.CodeDom.CodeNamespace
return System.CodeDom.CodeMemberMethod

GenerateFactory() public static method

Generates a Function with a Full ado.net constructor beavior. It Creates a new Instance of and then fills all public properties
public static GenerateFactory ( DbClassInfoCache target, FactoryHelperSettings settings, CodeNamespace importNameSpace ) : CodeMemberMethod
target DbClassInfoCache
settings FactoryHelperSettings
importNameSpace System.CodeDom.CodeNamespace
return System.CodeDom.CodeMemberMethod

GenerateTypeConstructor() public static method

public static GenerateTypeConstructor ( IEnumerable propertyToDbColumn, string altNamespace ) : CodeMemberMethod
propertyToDbColumn IEnumerable
altNamespace string
return System.CodeDom.CodeMemberMethod

GenerateTypeConstructor() public static method

Creates a new CodeDOM Element that is ether a Factory(Public Static Object Factory) or an constructor Both functions accepts only one Argument of type IDataRecord Both functions are empty
public static GenerateTypeConstructor ( bool factory = false ) : CodeMemberMethod
factory bool
return System.CodeDom.CodeMemberMethod

Shortify() public static method

public static Shortify ( CodeTypeReference typeReference, Type type, CodeNamespaceImportCollection imports ) : void
typeReference System.CodeDom.CodeTypeReference
type System.Type
imports System.CodeDom.CodeNamespaceImportCollection
return void