C# 클래스 Microsoft.Cci.MutableCodeModel.YieldReturnYieldBreakReplacer

상속: Microsoft.Cci.MutableCodeModel.CodeRewriter
파일 보기 프로젝트 열기: visualmutator/visualmutator 1 사용 예제들

공개 메소드들

메소드 설명
Rewrite ( IYieldBreakStatement yieldBreakStatement ) : IStatement

Replace a yield break with: { this.state = -2; return; }

Rewrite ( IYieldReturnStatement yieldReturnStatement ) : IStatement

Replace a (yield return exp)with a new block of the form: { Fresh_Label:; this.current = exp; state = Fresh_state; return true; } and associate the newly generated Fresh_state with its entry point: Fresh_label.

비공개 메소드들

메소드 설명
GetStateEntries ( BlockStatement body ) : ILabeledStatement>.Dictionary

Compute the mapping between every (starting and continuing) state and their unique entry points. It does so by inserting a unique label at the entry points and associate the state with the label.

YieldReturnYieldBreakReplacer ( IteratorClosureInformation iteratorClosure, IMetadataHost host ) : Microsoft.Cci.MutableCodeModel

메소드 상세

Rewrite() 공개 메소드

Replace a yield break with: { this.state = -2; return; }
public Rewrite ( IYieldBreakStatement yieldBreakStatement ) : IStatement
yieldBreakStatement IYieldBreakStatement
리턴 IStatement

Rewrite() 공개 메소드

Replace a (yield return exp)with a new block of the form: { Fresh_Label:; this.current = exp; state = Fresh_state; return true; } and associate the newly generated Fresh_state with its entry point: Fresh_label.
public Rewrite ( IYieldReturnStatement yieldReturnStatement ) : IStatement
yieldReturnStatement IYieldReturnStatement
리턴 IStatement