Ejemplo n.º 1
0
 public EditedMethodBody(MethodDef originalMethod, Emit.MethodBody newBody, MethodImplAttributes implAttributes, CustomAttribute[] customAttributes)
 {
     OriginalMethod   = originalMethod;
     NewBody          = newBody;
     ImplAttributes   = implAttributes;
     CustomAttributes = customAttributes;
 }
Ejemplo n.º 2
0
 public BodyState(Emit.MethodBody body, MethodImplAttributes implAttributes, CustomAttribute[] customAttributes, bool isBodyModified)
 {
     this.body             = body;
     this.implAttributes   = implAttributes;
     this.customAttributes = customAttributes;
     this.isBodyModified   = isBodyModified;
 }
Ejemplo n.º 3
0
 public BodyState(MethodDef method, bool isBodyModified)
 {
     this.body             = method.MethodBody;
     this.implAttributes   = method.ImplAttributes;
     this.customAttributes = method.CustomAttributes.ToArray();
     this.isBodyModified   = isBodyModified;
 }
Ejemplo n.º 4
0
 public EditedMethodBodyUpdater(Lazy <IMethodAnnotations> methodAnnotations, ModuleDocumentNode modNode, MethodDef originalMethod, Emit.MethodBody newBody, MethodImplAttributes newImplAttributes, CustomAttribute[] newCustomAttributes, DeclSecurity[] newDeclSecurities)
 {
     this.methodAnnotations = methodAnnotations;
     this.ownerNode         = modNode.Context.DocumentTreeView.FindNode(originalMethod);
     if (ownerNode == null)
     {
         throw new InvalidOperationException();
     }
     this.method            = originalMethod;
     this.originalBodyState = new BodyState(originalMethod, methodAnnotations.Value.IsBodyModified(method));
     this.newBodyState      = new BodyState(newBody, newImplAttributes, newCustomAttributes, newDeclSecurities, true);
 }
 public BodyState(MethodDef method, bool isBodyModified)
 {
     this.body           = method.MethodBody;
     this.implAttributes = method.ImplAttributes;
     this.isBodyModified = isBodyModified;
 }
Ejemplo n.º 6
0
 public EditedMethodUpdater(Lazy <IMethodAnnotations> methodAnnotations, ModuleDocumentNode modNode, MethodDef originalMethod, Emit.MethodBody newBody, MethodDefOptions methodDefOptions)
 {
     this.methodAnnotations = methodAnnotations;
     this.ownerNode         = modNode.Context.DocumentTreeView.FindNode(originalMethod);
     if (ownerNode == null)
     {
         throw new InvalidOperationException();
     }
     this.method = originalMethod;
     this.originalMethodState = new MethodState(originalMethod, methodAnnotations.Value.IsBodyModified(method));
     this.newMethodState      = new MethodState(newBody, methodDefOptions, true);
 }
Ejemplo n.º 7
0
 public MethodState(Emit.MethodBody body, MethodDefOptions methodDefOptions, bool isBodyModified)
 {
     this.body             = body;
     this.methodDefOptions = methodDefOptions;
     this.isBodyModified   = isBodyModified;
 }
Ejemplo n.º 8
0
 public MethodState(MethodDef method, bool isBodyModified)
 {
     this.body             = method.MethodBody;
     this.methodDefOptions = new MethodDefOptions(method);
     this.isBodyModified   = isBodyModified;
 }
Ejemplo n.º 9
0
 public EditedMethod(MethodDef originalMethod, Emit.MethodBody newBody, MethodDefOptions methodDefOptions)
 {
     OriginalMethod   = originalMethod;
     NewBody          = newBody;
     MethodDefOptions = methodDefOptions;
 }
Ejemplo n.º 10
0
			public MethodState(Emit.MethodBody body, MethodDefOptions methodDefOptions, bool isBodyModified) {
				this.body = body;
				this.methodDefOptions = methodDefOptions;
				this.isBodyModified = isBodyModified;
			}
Ejemplo n.º 11
0
			public MethodState(MethodDef method, bool isBodyModified) {
				body = method.MethodBody;
				methodDefOptions = new MethodDefOptions(method);
				this.isBodyModified = isBodyModified;
			}
Ejemplo n.º 12
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode     = methodNode;
     this.newOptions     = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }
Ejemplo n.º 13
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode = methodNode;
     this.newOptions = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }