共用方式為


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) 包裝對串行化和還原串行化協助程式方法的呼叫。

適用於