コード例 #1
0
 public NuGenCodeObjectDisplayOptions(int instructionOffset, bool exactLocation)
 {
     if (exactLocation)
     {
         CurrentLine = new NuGenCurrentLine(instructionOffset);
     }
     else
     {
         CurrentLine = new NuGenCallerLine(instructionOffset);
     }
 }
コード例 #2
0
        private void ShowCodeObject()
        {
            if (callStackView.SelectedItems.Count == 1)
            {
                ListViewItem          selectedItem     = callStackView.SelectedItems[0];
                NuGenFrameInformation frameInformation = selectedItem.Tag as NuGenFrameInformation;

                if (frameInformation != null)
                {
                    frameInformation.RefreshFrame();
                    List <NuGenBaseLineDescriptor> specialLines   = null;
                    NuGenCodeObjectDisplayOptions  displayOptions = new NuGenCodeObjectDisplayOptions();

                    if (frameInformation.IsActiveFrame)
                    {
                        if (frameInformation.IsExactLocation)
                        {
                            displayOptions.CurrentLine = new NuGenCurrentLine(frameInformation.Offset);
                        }
                        else
                        {
                            displayOptions.CurrentLine = new NuGenCallerLine(frameInformation.Offset);
                        }
                    }
                    else
                    {
                        NuGenBaseLineDescriptor lineDescriptor = null;
                        specialLines = new List <NuGenBaseLineDescriptor>(1);

                        if (frameInformation.IsExactLocation)
                        {
                            lineDescriptor = new NuGenExactCallerLine(frameInformation.Offset);
                        }
                        else
                        {
                            lineDescriptor = new NuGenCallerLine(frameInformation.Offset);
                        }

                        specialLines.Add(lineDescriptor);
                    }

                    displayOptions.SpecialLinesToAdd = specialLines;

                    NuGenUIHandler.Instance.ShowCodeObject(frameInformation.MethodDefinition, displayOptions);
                    NuGenUIHandler.Instance.FrameChangedUpdate(frameInformation.Refresher, frameInformation.Frame, false);
                }
            }
        }