VisualizerDevelopmentHost Constructor (Object, Type, Type)
Namespace: Microsoft.VisualStudio.DebuggerVisualizers
Assembly: Microsoft.VisualStudio.DebuggerVisualizers (in Microsoft.VisualStudio.DebuggerVisualizers.dll)
Syntax
'Declaration
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
)
Parameters
objectToVisualize
Type: System.ObjectThe data object you want to show in the visualizer. If you are testing a String visualizer, for example, this parameter would be a String that you want to show in the visualizer.
- visualizer
Type: System.Type
- visualizerObjectSource
Type: System.Type
Remarks
Constructor to create a visualizer development hostby using a data object that you want to test the visualizer on and a type that identifies the visualizer class.
Examples
// 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();
}
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
VisualizerDevelopmentHost Class