Esempio n. 1
0
 public EditedMethodBody(MethodDef originalMethod, Emit.MethodBody newBody, MethodImplAttributes implAttributes, CustomAttribute[] customAttributes)
 {
     OriginalMethod   = originalMethod;
     NewBody          = newBody;
     ImplAttributes   = implAttributes;
     CustomAttributes = customAttributes;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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;
 }
Esempio 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);
 }
Esempio n. 7
0
 public MethodState(Emit.MethodBody body, MethodDefOptions methodDefOptions, bool isBodyModified)
 {
     this.body             = body;
     this.methodDefOptions = methodDefOptions;
     this.isBodyModified   = isBodyModified;
 }
Esempio n. 8
0
 public MethodState(MethodDef method, bool isBodyModified)
 {
     this.body             = method.MethodBody;
     this.methodDefOptions = new MethodDefOptions(method);
     this.isBodyModified   = isBodyModified;
 }
Esempio n. 9
0
 public EditedMethod(MethodDef originalMethod, Emit.MethodBody newBody, MethodDefOptions methodDefOptions)
 {
     OriginalMethod   = originalMethod;
     NewBody          = newBody;
     MethodDefOptions = methodDefOptions;
 }
Esempio n. 10
0
			public MethodState(Emit.MethodBody body, MethodDefOptions methodDefOptions, bool isBodyModified) {
				this.body = body;
				this.methodDefOptions = methodDefOptions;
				this.isBodyModified = isBodyModified;
			}
Esempio n. 11
0
			public MethodState(MethodDef method, bool isBodyModified) {
				body = method.MethodBody;
				methodDefOptions = new MethodDefOptions(method);
				this.isBodyModified = isBodyModified;
			}
Esempio n. 12
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode     = methodNode;
     this.newOptions     = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }
Esempio n. 13
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode = methodNode;
     this.newOptions = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }