Add method to re-read all blocks

This commit is contained in:
de4dot 2012-02-03 04:23:08 +01:00
parent 814ca402bf
commit 8e89e011e9

View File

@ -41,9 +41,13 @@ namespace de4dot.blocks {
}
public Blocks(MethodDefinition method) {
var body = method.Body;
this.method = method;
this.locals = body.Variables;
updateBlocks();
}
public void updateBlocks() {
var body = method.Body;
locals = body.Variables;
methodBlocks = new InstructionListParser(body.Instructions, body.ExceptionHandlers).parse();
}