IVisualizerObjectProvider.GetData Method
Namespace: Microsoft.VisualStudio.DebuggerVisualizers
Assembly: Microsoft.VisualStudio.DebuggerVisualizers (in microsoft.visualstudio.debuggervisualizers.dll)
Assembly: Microsoft.VisualStudio.DebuggerVisualizers (in microsoft.visualstudio.debuggervisualizers.dll)
Return Value
A stream of data containing the contents of the object being visualized. Calling this method results in VisualizerObjectSource.GetData being called on the VisualizerObjectSource. The return value of that GetData call is then returned to the caller of this method.Return Value
A stream of data that contains the contents of the object being visualized. Calling this method results in VisualizerObjectSource.GetData being called on the VisualizerObjectSource. The return value of that GetData call is then returned to the caller of this method.
public class DebuggerSide : DialogDebuggerVisualizer
{
override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
Stream myStream = objectProvider.GetData();
Stream myNewStream;
// Here is where you would deserialize the data into a useful
// format and show the visualizer
// Make sure the object is replacable before you try to replace
// it. Otherwise, you will get an exception.
if (objectProvider.IsObjectReplaceable)
{
// reserialize here
objectProvider.ReplaceData(myNewStream);
}
}
// Other class methods would be here.
}
public class DebuggerSide : DialogDebuggerVisualizer
{
override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
Stream myStream = objectProvider.GetData();
Stream myNewStream;
// Here is where you would deserialize the data into a useful
// format and show the visualizer
// Make sure the object is replacable before you try to replace
// it. Otherwise, you will get an exception.
if (objectProvider.IsObjectReplaceable)
{
// reserialize here
objectProvider.ReplaceData(myNewStream);
}
}
// Other class methods would be here.
}