Udostępnij za pośrednictwem


Właściwość IVisualizerObjectProvider.IsObjectReplaceable —

Przestrzeń nazw:  Microsoft.VisualStudio.DebuggerVisualizers
Zestaw:  Microsoft.VisualStudio.DebuggerVisualizers (w Microsoft.VisualStudio.DebuggerVisualizers.dll)

Składnia

'Deklaracja
ReadOnly Property IsObjectReplaceable As Boolean
bool IsObjectReplaceable { get; }
property bool IsObjectReplaceable {
    bool get ();
}
abstract IsObjectReplaceable : bool with get
function get IsObjectReplaceable () : boolean

Wartość właściwości

Typ: Boolean
Określa, czy obiekt danych, są przedstawiane jest wymienne (odczyt/zapis) lub nonreplaceable (tylko do odczytu).

Uwagi

Przed podjęciem próby zastąpienia danych przez wywołanie ReplaceData lub ReplaceObject, wywołanie tej metody, aby ustalić, czy obiekt jest wymienny.Jeśli ta metoda zwraca wartość false, traktować obiekt jako tylko do odczytu.

Przykłady

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.
      if (objectProvider.IsObjectReplaceable)
      {
         objectProvider.ReplaceObject(myNewString);
      }
   }
// Other DebuggerSide methods ommitted for clarity.
}

Zabezpieczenia programu .NET Framework

Zobacz też

Informacje

IVisualizerObjectProvider Interfejs

Przestrzeń nazw Microsoft.VisualStudio.DebuggerVisualizers