C# Class Microsoft.Cci.MutableCodeModel.MethodBodyMappingMutator

Use this as a base class when you try to mutate the method body of method M1 in class C1 to be used as method body of method M2 in class C2. supporting the substitution of parameters as well as type parameters.
Inheritance: Microsoft.Cci.MutableCodeModel.CodeMutatingVisitor
显示文件 Open project: visualmutator/visualmutator

Public Methods

Method Description
MethodBodyMappingMutator ( IMetadataHost host ) : Microsoft.Cci.MutableCodeModel

Use this as a base class when you try to mutate the method body of method M1 in class C1 to be used as method body of method M2 in class C2. Anticipating the substitution of parameters as well as type parameters, this mutator copies references but not definitions. If a reference is itself a definition, a new reference will be created.

Visit ( IGenericMethodParameterReference genericMethodParameterReference ) : IGenericMethodParameterReference

Visit a genericMethodParameterReference. Do not copy if it is a genericMethodParameter.

Visit ( IGenericTypeParameterReference genericTypeParameterReference ) : IGenericTypeParameterReference

Visit a genericTypeParameterReference. Do not copy if it is a generic type parameter.

Visit ( INamespaceTypeReference namespaceTypeReference ) : INamespaceTypeReference

Leaves namespace type references alone since they cannot involve type parameters of the target class or method.

Visit ( INestedTypeReference nestedTypeReference ) : INestedTypeReference

Copies specialized nested type references since their containing types may involve type parameters, but leaves other kinds of nested type references alone.

Method Details

MethodBodyMappingMutator() public method

Use this as a base class when you try to mutate the method body of method M1 in class C1 to be used as method body of method M2 in class C2. Anticipating the substitution of parameters as well as type parameters, this mutator copies references but not definitions. If a reference is itself a definition, a new reference will be created.
public MethodBodyMappingMutator ( IMetadataHost host ) : Microsoft.Cci.MutableCodeModel
host IMetadataHost An object representing the application that is hosting this mutator. It is used to obtain access to some global /// objects and services such as the shared name table and the table for interning references.
return Microsoft.Cci.MutableCodeModel

Visit() public method

Visit a genericMethodParameterReference. Do not copy if it is a genericMethodParameter.
public Visit ( IGenericMethodParameterReference genericMethodParameterReference ) : IGenericMethodParameterReference
genericMethodParameterReference IGenericMethodParameterReference
return IGenericMethodParameterReference

Visit() public method

Visit a genericTypeParameterReference. Do not copy if it is a generic type parameter.
public Visit ( IGenericTypeParameterReference genericTypeParameterReference ) : IGenericTypeParameterReference
genericTypeParameterReference IGenericTypeParameterReference
return IGenericTypeParameterReference

Visit() public method

Leaves namespace type references alone since they cannot involve type parameters of the target class or method.
public Visit ( INamespaceTypeReference namespaceTypeReference ) : INamespaceTypeReference
namespaceTypeReference INamespaceTypeReference The namespace type reference.
return INamespaceTypeReference

Visit() public method

Copies specialized nested type references since their containing types may involve type parameters, but leaves other kinds of nested type references alone.
public Visit ( INestedTypeReference nestedTypeReference ) : INestedTypeReference
nestedTypeReference INestedTypeReference The nested type reference.
return INestedTypeReference