Condividi tramite


Proprietà IVisualizerObjectProvider.IsObjectReplaceable

Spazio dei nomi:  Microsoft.VisualStudio.DebuggerVisualizers
Assembly:  Microsoft.VisualStudio.DebuggerVisualizers (in Microsoft.VisualStudio.DebuggerVisualizers.dll)

Sintassi

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

Valore proprietà

Tipo: System.Boolean
Determina se l'oggetto dati da visualizzare è sostituibili (lettura /scrittura) o nonreplaceable (sola lettura).

Note

Prima di tentare di sostituire i dati chiamando ReplaceData o ReplaceObject, chiamare questo metodo per determinare se l'oggetto è sostituibile.se questo metodo restituisce un valore di false, considerare l'oggetto come di sola lettura.

Esempi

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.
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

IVisualizerObjectProvider Interfaccia

Spazio dei nomi Microsoft.VisualStudio.DebuggerVisualizers