C# Class Microsoft.Cci.MutableContracts.IteratorContracts.Replacer

Substitutes all field references with the expressions that are in the captured things table passed to the constructor. Also replaces locals from the MoveNext method with new locals that belong to the interator method.
Inheritance: Microsoft.Cci.MutableCodeModel.Contracts.CodeAndContractRewriter
Afficher le fichier Open project: visualmutator/visualmutator

Méthodes publiques

Méthode Description
Replacer ( IMetadataHost host, IExpression>.Dictionary capturedThings, IMethodDefinition iteratorMethod, IMethodDefinition moveNext ) : System
Rewrite ( IBoundExpression boundExpression ) : IExpression

If the boundExpression represents a parameter of the target method, it is replaced with the equivalent parameter of the source method.

Rewrite ( ILocalDefinition localDefinition ) : ILocalDefinition
RewriteChildren ( Microsoft.Cci.MutableCodeModel.AddressableExpression addressableExpression ) : void
RewriteChildren ( ContractElement contractElement ) : void
RewriteReference ( ILocalDefinition localDefinition ) : object

TODO: This is necessary only because the base rewriter for things like TargetExpression call this method and its definition in the base rewriter is to not visit it, but to just return it.

Method Details

Replacer() public méthode

public Replacer ( IMetadataHost host, IExpression>.Dictionary capturedThings, IMethodDefinition iteratorMethod, IMethodDefinition moveNext ) : System
host IMetadataHost
capturedThings IExpression>.Dictionary
iteratorMethod IMethodDefinition
moveNext IMethodDefinition
Résultat System

Rewrite() public méthode

If the boundExpression represents a parameter of the target method, it is replaced with the equivalent parameter of the source method.
public Rewrite ( IBoundExpression boundExpression ) : IExpression
boundExpression IBoundExpression The bound expression.
Résultat IExpression

Rewrite() public méthode

public Rewrite ( ILocalDefinition localDefinition ) : ILocalDefinition
localDefinition ILocalDefinition
Résultat ILocalDefinition

RewriteChildren() public méthode

public RewriteChildren ( Microsoft.Cci.MutableCodeModel.AddressableExpression addressableExpression ) : void
addressableExpression Microsoft.Cci.MutableCodeModel.AddressableExpression
Résultat void

RewriteChildren() public méthode

public RewriteChildren ( ContractElement contractElement ) : void
contractElement ContractElement
Résultat void

RewriteReference() public méthode

TODO: This is necessary only because the base rewriter for things like TargetExpression call this method and its definition in the base rewriter is to not visit it, but to just return it.
public RewriteReference ( ILocalDefinition localDefinition ) : object
localDefinition ILocalDefinition
Résultat object