Imports Microsoft.VisualStudio.DebuggerVisualizers
Imports System.Diagnostics
Imports CarLib

<Assembly: DebuggerVisualizer( _
    GetType(CarVisualizer.DebuggerInterface), _
    GetType(VisualizerObjectSource), _
    Target:=GetType(CarLib.Car), Description:="Car Visualizer")> 
Public Class DebuggerInterface
    Inherits DialogDebuggerVisualizer


    Protected Overrides Sub Show(ByVal windowService As Microsoft.VisualStudio.DebuggerVisualizers.IDialogVisualizerService, ByVal objectProvider As Microsoft.VisualStudio.DebuggerVisualizers.IVisualizerObjectProvider)

        Dim carClass As Car = New Car()
        carClass = CType(objectProvider.GetObject(), Car)

        Dim carForm As CarForm
        carForm = New CarForm(carClass)
        carForm.ShowDialog()

    End Sub
End Class

