C# Класс 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.
Наследование: Microsoft.Cci.MutableCodeModel.Contracts.CodeAndContractRewriter
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Replacer() публичный Метод

public Replacer ( IMetadataHost host, IExpression>.Dictionary capturedThings, IMethodDefinition iteratorMethod, IMethodDefinition moveNext ) : System
host IMetadataHost
capturedThings IExpression>.Dictionary
iteratorMethod IMethodDefinition
moveNext IMethodDefinition
Результат System

Rewrite() публичный Метод

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.
Результат IExpression

Rewrite() публичный Метод

public Rewrite ( ILocalDefinition localDefinition ) : ILocalDefinition
localDefinition ILocalDefinition
Результат ILocalDefinition

RewriteChildren() публичный Метод

public RewriteChildren ( Microsoft.Cci.MutableCodeModel.AddressableExpression addressableExpression ) : void
addressableExpression Microsoft.Cci.MutableCodeModel.AddressableExpression
Результат void

RewriteChildren() публичный Метод

public RewriteChildren ( ContractElement contractElement ) : void
contractElement ContractElement
Результат void

RewriteReference() публичный Метод

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
Результат object