C# Class Tp.Core.Expressions.Visitors.CtorTypeChanger

Replaces constructions of one type with constructions of another one. Supports generic types. Matches properties by name in case types has properties with the same name.
Inheritance: System.Linq.Expressions.ExpressionVisitor
Mostra file Open project: TargetProcess/Target-Process-Plugins

Public Methods

Method Description
CtorTypeChanger ( Type baseType, Type derivedType ) : System

Protected Methods

Method Description
VisitMemberInit ( MemberInitExpression expression ) : Expression
VisitNew ( NewExpression node ) : Expression

Private Methods

Method Description
CreateNewConstructor ( NewExpression node, ConstructorInfo constructor ) : Expression
FindApropriateCtor ( ConstructorInfo constructor, Type type ) : ConstructorInfo
ReplaceConstructor ( NewExpression node, Type type ) : Expression

Method Details

CtorTypeChanger() public method

public CtorTypeChanger ( Type baseType, Type derivedType ) : System
baseType System.Type
derivedType System.Type
return System

VisitMemberInit() protected method

protected VisitMemberInit ( MemberInitExpression expression ) : Expression
expression System.Linq.Expressions.MemberInitExpression
return System.Linq.Expressions.Expression

VisitNew() protected method

protected VisitNew ( NewExpression node ) : Expression
node System.Linq.Expressions.NewExpression
return System.Linq.Expressions.Expression