예제 #1
0
        public void Execute(TextViewContext context)
        {
            var list = GetMappings(context);

            if (list == null)
            {
                return;
            }

            var method     = list[0].MemberMapping.MethodDefinition;
            var methodNode = MainWindow.Instance.AssemblyListTreeNode.FindMethodNode(method);

            if (methodNode == null)
            {
                MainWindow.Instance.ShowMessageBox(string.Format("Could not find method: {0}", method));
                return;
            }

            MethodBodySettingsCommand.Execute(new ILSpyTreeNode[] { methodNode }, GetInstructionOffsets(method, list));
        }
예제 #2
0
 protected override void Execute(Context ctx)
 {
     MethodBodySettingsCommand.Execute(ctx.Nodes);
 }
예제 #3
0
 protected override bool CanExecute(Context ctx)
 {
     return(ctx.ReferenceSegment.IsLocalTarget &&
            MethodBodySettingsCommand.CanExecute(ctx.Nodes));
 }
예제 #4
0
 protected override void ExecuteInternal(ILSpyTreeNode[] nodes)
 {
     MethodBodySettingsCommand.Execute(nodes);
 }
예제 #5
0
 protected override bool CanExecuteInternal(ILSpyTreeNode[] nodes)
 {
     return(MethodBodySettingsCommand.CanExecute(nodes));
 }