Example #1
0
 EditMethodBodyILCommand(IMethodAnnotations methodAnnotations, MethodNode methodNode, MethodBodyOptions options)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     newOptions             = options;
     origMethodBody         = methodNode.MethodDef.MethodBody;
 }
Example #2
0
 MethodBodySettingsCommand(IMethodAnnotations methodAnnotations, IMethodNode methodNode, MethodBodyOptions options)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     this.newOptions        = options;
     this.origMethodBody    = methodNode.MethodDef.MethodBody;
 }
Example #3
0
 MethodBodyOptions CopyTo(MethodBodyOptions options)
 {
     NativeMethodBodyVM.CopyTo(options.NativeMethodBodyOptions);
     CilBodyVM.CopyTo(options.CilBodyOptions);
     options.BodyType = (MethodBodyType)MethodBodyTypeVM.SelectedItem;
     options.CodeType = (MethodImplAttributes)(Method.CodeType)CodeTypeVM.SelectedItem;
     return(options);
 }
Example #4
0
		void InitializeFrom(MethodBodyOptions options) {
			NativeMethodBodyVM.InitializeFrom(options.NativeMethodBodyOptions);
			CilBodyVM.InitializeFrom(options.CilBodyOptions);
			MethodBodyTypeVM.SelectedItem = options.BodyType;

			// Initialize this last since it gets updated when body type gets changed
			CodeTypeVM.SelectedItem = (Method.CodeType)options.CodeType;
		}
Example #5
0
        void InitializeFrom(MethodBodyOptions options)
        {
            NativeMethodBodyVM.InitializeFrom(options.NativeMethodBodyOptions);
            CilBodyVM.InitializeFrom(options.CilBodyOptions);
            MethodBodyTypeVM.SelectedItem = options.BodyType;

            // Initialize this last since it gets updated when body type gets changed
            CodeTypeVM.SelectedItem = (Method.CodeType)options.CodeType;
        }
Example #6
0
		public MethodBodyVM(MethodBodyOptions options, ModuleDef ownerModule, IDecompilerService decompilerService, TypeDef ownerType, MethodDef ownerMethod) {
			origOptions = options;

			NativeMethodBodyVM = new MethodBody.NativeMethodBodyVM(options.NativeMethodBodyOptions, false);
			NativeMethodBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
			CilBodyVM = new MethodBody.CilBodyVM(options.CilBodyOptions, ownerModule, decompilerService, ownerType, ownerMethod, false);
			CilBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
			MethodBodyTypeVM = new EnumListVM(methodBodyTypeList, (a, b) => OnMethodBodyTypeChanged());

			Reinitialize();
		}
Example #7
0
		public MethodBodyVM(MethodBodyOptions options, ModuleDef ownerModule, Language language, TypeDef ownerType, MethodDef ownerMethod) {
			this.origOptions = options;

			this.nativeMethodBodyVM = new MethodBody.NativeMethodBodyVM(options.NativeMethodBodyOptions, false);
			NativeMethodBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
			this.cilBodyVM = new MethodBody.CilBodyVM(options.CilBodyOptions, ownerModule, language, ownerType, ownerMethod, false);
			CilBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
			this.methodBodyTypeVM = new EnumListVM(methodBodyTypeList, (a, b) => OnMethodBodyTypeChanged());

			Reinitialize();
		}
Example #8
0
        public MethodBodyVM(MethodBodyOptions options, ModuleDef ownerModule, Language language, TypeDef ownerType, MethodDef ownerMethod)
        {
            this.origOptions = options;

            this.nativeMethodBodyVM             = new MethodBody.NativeMethodBodyVM(options.NativeMethodBodyOptions, false);
            NativeMethodBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
            this.cilBodyVM             = new MethodBody.CilBodyVM(options.CilBodyOptions, ownerModule, language, ownerType, ownerMethod, false);
            CilBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
            this.methodBodyTypeVM      = new EnumListVM(methodBodyTypeList, (a, b) => OnMethodBodyTypeChanged());

            Reinitialize();
        }
Example #9
0
        public MethodBodyVM(MethodBodyOptions options, ModuleDef ownerModule, IDecompilerService decompilerService, TypeDef ownerType, MethodDef ownerMethod)
        {
            origOptions = options;

            NativeMethodBodyVM = new MethodBody.NativeMethodBodyVM(options.NativeMethodBodyOptions, false);
            NativeMethodBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
            CilBodyVM = new MethodBody.CilBodyVM(options.CilBodyOptions, ownerModule, decompilerService, ownerType, ownerMethod, false);
            CilBodyVM.PropertyChanged += (s, e) => HasErrorUpdated();
            MethodBodyTypeVM           = new EnumListVM(methodBodyTypeList, (a, b) => OnMethodBodyTypeChanged());

            Reinitialize();
        }
Example #10
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode     = methodNode;
     this.newOptions     = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }
Example #11
0
		EditMethodBodyILCommand(IMethodAnnotations methodAnnotations, MethodNode methodNode, MethodBodyOptions options) {
			this.methodAnnotations = methodAnnotations;
			this.methodNode = methodNode;
			newOptions = options;
			origMethodBody = methodNode.MethodDef.MethodBody;
		}
Example #12
0
 MethodBodyOptions CopyTo(MethodBodyOptions options)
 {
     NativeMethodBodyVM.CopyTo(options.NativeMethodBodyOptions);
     CilBodyVM.CopyTo(options.CilBodyOptions);
     options.BodyType = (MethodBodyType)MethodBodyTypeVM.SelectedItem;
     options.CodeType = (MethodImplAttributes)(Method.CodeType)CodeTypeVM.SelectedItem;
     return options;
 }
Example #13
0
		MethodBodySettingsCommand(IMethodAnnotations methodAnnotations, IMethodNode methodNode, MethodBodyOptions options) {
			this.methodAnnotations = methodAnnotations;
			this.methodNode = methodNode;
			this.newOptions = options;
			this.origMethodBody = methodNode.MethodDef.MethodBody;
		}
Example #14
0
 MethodBodySettingsCommand(MethodTreeNode methodNode, MethodBodyOptions options)
 {
     this.methodNode = methodNode;
     this.newOptions = options;
     this.origMethodBody = methodNode.MethodDefinition.MethodBody;
 }