Share via


VisualizerDevelopmentHost Constructors

Definition

Overloads

VisualizerDevelopmentHost(Object, Type)

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.

VisualizerDevelopmentHost(Object, Type, Type)

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.

VisualizerDevelopmentHost(Object, Type, Type, Boolean)

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.

Remarks

Constructor to create a visualizer development host.

VisualizerDevelopmentHost(Object, Type)

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.

public:
 VisualizerDevelopmentHost(System::Object ^ objectToVisualize, Type ^ visualizer);
public:
 VisualizerDevelopmentHost(System::Object ^ targetObject, Type ^ visualizer);
public:
 VisualizerDevelopmentHost(Platform::Object ^ objectToVisualize, Platform::Type ^ visualizer);
public VisualizerDevelopmentHost (object objectToVisualize, Type visualizer);
public VisualizerDevelopmentHost (object targetObject, Type visualizer);
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
Public Sub New (objectToVisualize As Object, visualizer As Type)
Public Sub New (targetObject As Object, visualizer As Type)

Parameters

objectToVisualizetargetObject
Object

The 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

The type of the visualizer to use.

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();  
   }  
}  
// 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();
    }
}

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.

Applies to

VisualizerDevelopmentHost(Object, Type, Type)

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.

public:
 VisualizerDevelopmentHost(System::Object ^ objectToVisualize, Type ^ visualizer, Type ^ visualizerObjectSource);
public:
 VisualizerDevelopmentHost(System::Object ^ targetObject, Type ^ visualizer, Type ^ visualizerObjectSourceType);
public:
 VisualizerDevelopmentHost(Platform::Object ^ objectToVisualize, Platform::Type ^ visualizer, Platform::Type ^ visualizerObjectSource);
public VisualizerDevelopmentHost (object objectToVisualize, Type visualizer, Type visualizerObjectSource);
public VisualizerDevelopmentHost (object targetObject, Type visualizer, Type visualizerObjectSourceType);
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type * Type -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type * Type -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
Public Sub New (objectToVisualize As Object, visualizer As Type, visualizerObjectSource As Type)
Public Sub New (targetObject As Object, visualizer As Type, visualizerObjectSourceType As Type)

Parameters

objectToVisualizetargetObject
Object

The 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

The type of the visualizer to use.

visualizerObjectSourcevisualizerObjectSourceType
Type

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();  
   }  
}  

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.

Applies to

VisualizerDevelopmentHost(Object, Type, Type, Boolean)

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.

public:
 VisualizerDevelopmentHost(System::Object ^ objectToVisualize, Type ^ visualizer, Type ^ visualizerObjectSource, bool replacementOK);
public:
 VisualizerDevelopmentHost(System::Object ^ targetObject, Type ^ visualizer, Type ^ visualizerObjectSourceType, bool isObjectReplaceable);
public:
 VisualizerDevelopmentHost(Platform::Object ^ objectToVisualize, Platform::Type ^ visualizer, Platform::Type ^ visualizerObjectSource, bool replacementOK);
public VisualizerDevelopmentHost (object objectToVisualize, Type visualizer, Type visualizerObjectSource, bool replacementOK);
public VisualizerDevelopmentHost (object targetObject, Type visualizer, Type visualizerObjectSourceType, bool isObjectReplaceable);
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type * Type * bool -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
new Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost : obj * Type * Type * bool -> Microsoft.VisualStudio.DebuggerVisualizers.VisualizerDevelopmentHost
Public Sub New (objectToVisualize As Object, visualizer As Type, visualizerObjectSource As Type, replacementOK As Boolean)
Public Sub New (targetObject As Object, visualizer As Type, visualizerObjectSourceType As Type, isObjectReplaceable As Boolean)

Parameters

objectToVisualizetargetObject
Object

The 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

The type of the visualizer to use.

visualizerObjectSourcevisualizerObjectSourceType
Type
replacementOKisObjectReplaceable
Boolean

This Boolean value determines the visualizer can replace (edit) the data object. Setting this value to false tells the visualizer host to treat the data object as read-only.

Remarks

This constructor allows error-checking code in your visualizer to be properly exercised. It corresponds to IsObjectReplaceable.

Applies to