DialogDebuggerVisualizer.Show 方法

命名空间:  Microsoft.VisualStudio.DebuggerVisualizers
程序集:  Microsoft.VisualStudio.DebuggerVisualizers(在 Microsoft.VisualStudio.DebuggerVisualizers.dll 中)

语法

声明
Protected Friend MustOverride Sub Show ( _
    windowService As IDialogVisualizerService, _
    objectProvider As IVisualizerObjectProvider _
)
protected internal abstract void Show(
    IDialogVisualizerService windowService,
    IVisualizerObjectProvider objectProvider
)
protected public:
virtual void Show(
    IDialogVisualizerService^ windowService, 
    IVisualizerObjectProvider^ objectProvider
) abstract
abstract Show : 
        windowService:IDialogVisualizerService * 
        objectProvider:IVisualizerObjectProvider -> unit 
 abstract function Show(
    windowService : IDialogVisualizerService, 
    objectProvider : IVisualizerObjectProvider
)

参数

备注

这是为显示可视化工具的用户界面而重写的方法。

示例

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);
   }
}

.NET Framework 安全性

请参见

参考

DialogDebuggerVisualizer 类

Microsoft.VisualStudio.DebuggerVisualizers 命名空间