IVisualizerObjectProvider.IsObjectReplaceable Propriété

Définition

public:
 property bool IsObjectReplaceable { bool get(); };
public:
 property bool IsObjectReplaceable { bool get(); };
public bool IsObjectReplaceable { get; }
member this.IsObjectReplaceable : bool
Public ReadOnly Property IsObjectReplaceable As Boolean

Valeur de propriété

Boolean

Détermine si l'objet de données qui est affiché est remplaçable (en lecture/écriture) ou non (en lecture seule).

Exemples

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

Remarques

Avant de tenter de remplacer des données en appelant ReplaceData ou ReplaceObject , appelez cette méthode pour déterminer si l’objet est remplaçable. Si cette méthode retourne false la valeur, traitez l’objet comme étant en lecture seule.

S’applique à