public EditedMethodUpdater(Lazy<IMethodAnnotations> methodAnnotations, ModuleDocumentNode modNode, MethodDef originalMethod, Emit.MethodBody newBody, MethodDefOptions methodDefOptions) { this.methodAnnotations = methodAnnotations; ownerNode = modNode.Context.DocumentTreeView.FindNode(originalMethod); if (ownerNode == null) throw new InvalidOperationException(); method = originalMethod; originalMethodState = new MethodState(originalMethod, methodAnnotations.Value.IsBodyModified(method)); newMethodState = new MethodState(newBody, methodDefOptions, true); }
public EditedMethod(MethodDef originalMethod, Emit.MethodBody newBody, MethodDefOptions methodDefOptions) { OriginalMethod = originalMethod; NewBody = newBody; MethodDefOptions = methodDefOptions; }
public MethodState(Emit.MethodBody body, MethodDefOptions methodDefOptions, bool isBodyModified) { this.body = body; this.methodDefOptions = methodDefOptions; this.isBodyModified = isBodyModified; }