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

Inheritance: Microsoft.Cci.MutableCodeModel.CodeRewriter
显示文件 Open project: visualmutator/visualmutator

Public Methods

Method Description
ExtractContracts ( IContractAwareHost contractAwareHost, PdbReader pdbReader, ContractExtractor extractor, ISourceMethodBody methodBody ) : MethodContract
Rewrite ( List statements ) : List

There might be more than one block in the iterator's MoveNext method. So let the base rewriter navigate down into the list of statements unless this is the one containing the contracts. This method assumes that a single contract does *not* span multiple blocks, but is fully contained within a single list of statements.

Private Methods

Method Description
FindNextContractStatement ( List statements, int i ) : int
HermansAlwaysRight ( IContractAwareHost contractAwareHost, ContractExtractor extractor, ISourceMethodBody sourceMethodBody, bool methodIsInReferenceAssembly, OldAndResultExtractor oldAndResultExtractor, PdbReader pdbReader ) : System

Method Details

ExtractContracts() public static method

public static ExtractContracts ( IContractAwareHost contractAwareHost, PdbReader pdbReader, ContractExtractor extractor, ISourceMethodBody methodBody ) : MethodContract
contractAwareHost IContractAwareHost
pdbReader PdbReader
extractor ContractExtractor
methodBody ISourceMethodBody
return MethodContract

Rewrite() public method

There might be more than one block in the iterator's MoveNext method. So let the base rewriter navigate down into the list of statements unless this is the one containing the contracts. This method assumes that a single contract does *not* span multiple blocks, but is fully contained within a single list of statements.
public Rewrite ( List statements ) : List
statements List
return List