Show Method
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

DialogDebuggerVisualizer.Show Method 

Namespace: Microsoft.VisualStudio.DebuggerVisualizers
Assembly: Microsoft.VisualStudio.DebuggerVisualizers (in microsoft.visualstudio.debuggervisualizers.dll)

protected internal abstract void Show (
	IDialogVisualizerService windowService,
	IVisualizerObjectProvider objectProvider
)
protected abstract void Show (
	IDialogVisualizerService windowService, 
	IVisualizerObjectProvider objectProvider
)
protected internal abstract function Show (
	windowService : IDialogVisualizerService, 
	objectProvider : IVisualizerObjectProvider
)

Parameters

windowService

An object of type IDialogVisualizerService, which provides methods your visualizer can use to display Windows forms, controls, and dialogs.

objectProvider

An object of type IVisualizerObjectProvider. This object provides communication from the debugger side of the visualizer to the object source (VisualizerObjectSource) on the debuggee side.

This is the method that you override to show the user interface for your visualizer.

public class Visualizer1 : DialogDebuggerVisualizer
{
   protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
   {
      // TODO: Get the object to display a visualizer for.
      //       Cast the result of objectProvider.GetObject() 
      //       to the type of the object being visualized.
      object data = (object)objectProvider.GetObject();

      // TODO: Display your view of the object.
      //       Replace displayForm with your own custom Form or Control.
      Form displayForm = new Form();
      displayForm.Text = data.ToString();
      windowService.ShowDialog(displayForm);
   }

}

Show:
© 2016 Microsoft