Udostępnij za pośrednictwem


Konstruktor VisualizerDevelopmentHost — (Object, Type)

Przestrzeń nazw:  Microsoft.VisualStudio.DebuggerVisualizers
Zestaw:  Microsoft.VisualStudio.DebuggerVisualizers (w Microsoft.VisualStudio.DebuggerVisualizers.dll)

Składnia

'Deklaracja
Public Sub New ( _
    objectToVisualize As Object, _
    visualizer As Type _
)
public VisualizerDevelopmentHost(
    Object objectToVisualize,
    Type visualizer
)
public:
VisualizerDevelopmentHost(
    Object^ objectToVisualize, 
    Type^ visualizer
)
new : 
        objectToVisualize:Object * 
        visualizer:Type -> VisualizerDevelopmentHost
public function VisualizerDevelopmentHost(
    objectToVisualize : Object, 
    visualizer : Type
)

Parametry

  • objectToVisualize
    Typ: Object

    Obiekt danych, które chcesz wyświetlić w podglądacza.Jeśli testujesz podglądacza ciąg znaków, na przykład, ten parametr byłoby ciąg, który chcesz wyświetlić w podglądacza.

  • visualizer
    Typ: Type

Uwagi

Konstruktor, aby utworzyć hostby rozwoju podglądacza, za pomocą obiektu danych, który chcesz przetestować podglądacza na i typ, który identyfikuje klasy podglądacza.

Przykłady

// MyVisualizer is the class you write to create the visualizer 
public class MyVisualizer : DialogDebuggerVisualizer
{
   // Here is where you put the methods to show your visualizer.
   // They are ommitted here for clarity.
   // ...
...// The following method creates and shows the visualizer development host: 
   public static void TestShowVisualizer(object MyDataObject)
   {
      // This statement creates the host:
      VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost (MyDataObject, typeof(MyVisualizer));
      // This statement calls the host to show the visualizer:
      visualizerHost.ShowVisualizer();
   }
}

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

VisualizerDevelopmentHost Klasa

Przeciążenie VisualizerDevelopmentHost

Przestrzeń nazw Microsoft.VisualStudio.DebuggerVisualizers