C# Class Microsoft.Cci.MutableCodeModel.RewriteAsMoveNext

A rewriter that takes a copy of the body of an iterator method and turns it into the body of a MoveNext method by replacing parameters and locals with iterator state fields and replacing occurrences of the generic method parameters of the iterator with generic type parameter of the iterator state class.
Inheritance: Microsoft.Cci.MutableCodeModel.CodeRewriter
Datei anzeigen Open project: visualmutator/visualmutator Class Usage Examples

Public Methods

Method Description
Rewrite ( IThisReference thisReference ) : IExpression
Rewrite ( ILocalDeclarationStatement localDeclarationStatement ) : IStatement
Rewrite ( IGenericMethodParameterReference genericMethodParameterReference ) : ITypeReference
RewriteChildren ( Microsoft.Cci.MutableCodeModel.AddressableExpression addressableExpression ) : void
RewriteChildren ( BlockStatement blockStatement ) : void
RewriteChildren ( Microsoft.Cci.MutableCodeModel.BoundExpression boundExpression ) : void
RewriteChildren ( Microsoft.Cci.MutableCodeModel.TargetExpression targetExpression ) : void

Private Methods

Method Description
RewriteAsMoveNext ( BoundField>.Dictionary fieldForCapturedLocalOrParameter, uint>.Dictionary iteratorLocalCount, IGenericTypeParameter>.Dictionary genericParameterMapping, IteratorClosureInformation closure, IMetadataHost host ) : Microsoft.Cci.MutableCodeModel

A rewriter that takes a copy of the body of an iterator method and turns it into the body of a MoveNext method by replacing parameters and locals with iterator state fields and replacing occurrences of the generic method parameters of the iterator with generic type parameter of the iterator state class.

Method Details

Rewrite() public method

public Rewrite ( IThisReference thisReference ) : IExpression
thisReference IThisReference
return IExpression

Rewrite() public method

public Rewrite ( ILocalDeclarationStatement localDeclarationStatement ) : IStatement
localDeclarationStatement ILocalDeclarationStatement
return IStatement

Rewrite() public method

public Rewrite ( IGenericMethodParameterReference genericMethodParameterReference ) : ITypeReference
genericMethodParameterReference IGenericMethodParameterReference
return ITypeReference

RewriteChildren() public method

public RewriteChildren ( Microsoft.Cci.MutableCodeModel.AddressableExpression addressableExpression ) : void
addressableExpression Microsoft.Cci.MutableCodeModel.AddressableExpression
return void

RewriteChildren() public method

public RewriteChildren ( BlockStatement blockStatement ) : void
blockStatement BlockStatement
return void

RewriteChildren() public method

public RewriteChildren ( Microsoft.Cci.MutableCodeModel.BoundExpression boundExpression ) : void
boundExpression Microsoft.Cci.MutableCodeModel.BoundExpression
return void

RewriteChildren() public method

public RewriteChildren ( Microsoft.Cci.MutableCodeModel.TargetExpression targetExpression ) : void
targetExpression Microsoft.Cci.MutableCodeModel.TargetExpression
return void