IVisualizerObjectProvider.TransferObject(Object) 方法

定义

注意

This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.TransferObject instead.

使用默认序列化序列化传出对象,然后调用 TransferData。 返回时反序列化传入的数据并返回反序列化的对象

public:
 System::Object ^ TransferObject(System::Object ^ outgoingObject);
public:
 Platform::Object ^ TransferObject(Platform::Object ^ outgoingObject);
winrt::Windows::Foundation::IInspectable TransferObject(winrt::Windows::Foundation::IInspectable const & outgoingObject);
public object TransferObject (object outgoingObject);
[System.Obsolete("This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.TransferObject instead.")]
public object TransferObject (object outgoingObject);
abstract member TransferObject : obj -> obj
[<System.Obsolete("This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.TransferObject instead.")>]
abstract member TransferObject : obj -> obj
Public Function TransferObject (outgoingObject As Object) As Object

参数

outgoingObject
Object

要传输回调试对象端的 对象。

返回

反序列化 的返回值 TransferData(Stream)的结果。

属性

示例

public class DebuggerSide : DialogDebuggerVisualizer
{
    override protected void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
    {
        // Get a string from the debuggee side and display it in a message box.  
        String myString = objectProvider.GetObject().ToString();
        MessageBox.Show(myString);

        // Modify the string and send it back to the debuggee side.  
        String myNewString = myString.ToUpper();
        // Make sure the object is replacable before you try to replace it.  
        // Otherwise, you will get an exception.  
        objectProvider.TransferObject(myNewString);
    }
    // Other DebuggerSide methods ommitted for clarity.  
}

注解

将数据对象传输回调试对象。 替换正在可视化的对象后调用此方法。 调用此方法以传输某些信息或在 VisualizerObjectSource 上调用命令。 此方法只包装 TransferData(Stream) 对序列化和反序列化帮助程序方法的调用。

适用于