命名空间:  Microsoft.VisualStudio.DebuggerVisualizers
程序集:  Microsoft.VisualStudio.DebuggerVisualizers(在 Microsoft.VisualStudio.DebuggerVisualizers.dll 中)
语法
声明
ReadOnly Property IsObjectReplaceable As Boolean
    Get
bool IsObjectReplaceable { get; }
property bool IsObjectReplaceable {
    bool get ();
}
abstract IsObjectReplaceable : bool
function get IsObjectReplaceable () : boolean
属性值
类型:System.Boolean
确定进行可视化处理的数据对象是可替换(读/写)的还是不可替换(只读)的。
备注
在尝试通过调用 ReplaceData 或 ReplaceObject 替换数据前,调用此方法确定对象是否可替换。如果此方法返回值 false,则视该对象为只读。
示例
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.
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。