// // // // // $Revision: 2197 $ // using System; using Debugger.Wrappers.CorDebug; namespace Debugger { /// /// Provides more specific access /// public partial class Value { /// Returns true if the value is null public bool IsNull { get { return CorValue == null; } } /// Gets a string representation of the value public string AsString { get { return Cache.AsString; } } /// Gets a string representation of the value // public string AsString { // get { // if (this.IsNull) return "nil"; // if (this.Type.IsArray) return "{" + this.Type.FullName + "}"; // if (this.Type.IsClass) return "{" + this.Type.FullName + "}"; // if (this.Type.IsValueType) return "{" + this.Type.FullName + "}"; // if (this.Type.IsPrimitive) return PrimitiveValue.ToString(); // // Does not work well with unit tests: (variable value) // // if (this.Type.IsPointer) return "0x" + this.CorValue.CastTo().Address.ToString("X8"); // if (this.Type.IsPointer) return "{" + this.Type.FullName + "}"; // if (this.Type.IsVoid) return "void"; // throw new DebuggerException("Unknown type"); // } // } } }