VisualizerDevelopmentHost Constructor (Object, 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 _
)
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
)
Parameters
objectToVisualize
Type: 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: 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
// 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();
}
}
.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