Konstruktor VisualizerDevelopmentHost — (Object, Type, 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, _
visualizerObjectSource As Type _
)
public VisualizerDevelopmentHost(
Object objectToVisualize,
Type visualizer,
Type visualizerObjectSource
)
public:
VisualizerDevelopmentHost(
Object^ objectToVisualize,
Type^ visualizer,
Type^ visualizerObjectSource
)
new :
objectToVisualize:Object *
visualizer:Type *
visualizerObjectSource:Type -> VisualizerDevelopmentHost
public function VisualizerDevelopmentHost(
objectToVisualize : Object,
visualizer : Type,
visualizerObjectSource : Type
)
Parametry
objectToVisualize
Typ: ObjectObiekt 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
- visualizerObjectSource
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
// MyObjectSource is an object you derive from VisualizerObjectSource.
// Objects deriving from VisualizerObjectSource and VisualizerObjectProvider
// allow you to customize communication between the debugger and debuggee sides.
// For simple visualizers, you do not need to do this.
public class MyObjectSource: VisualizerObjectSource
{
// ObjectSource methods ommitted for clarity.
}
// 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), typeof(MyObjectSource));
// This statement calls the host to show the visualizer:
visualizerHost.ShowVisualizer();
}
}
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Używanie bibliotek pochodzących z częściowo zaufanego kodu.
Zobacz też
Informacje
VisualizerDevelopmentHost Klasa