Browse Source

Using the property names from metadata rather then deriving from accessor methods.

pull/2/head
David Srbecký 15 years ago
parent
commit
9b70311945
  1. 1
      src/AddIns/Debugger/Debugger.Core/DebuggerException.cs
  2. 8
      src/AddIns/Debugger/Debugger.Core/MetaData/DebugPropertyInfo.cs
  3. 1
      src/AddIns/Debugger/Debugger.Core/MetaData/DebugType.cs

1
src/AddIns/Debugger/Debugger.Core/DebuggerException.cs

@ -10,6 +10,7 @@ namespace Debugger @@ -10,6 +10,7 @@ namespace Debugger
{
public DebuggerException() {}
public DebuggerException(string message): base(message) {}
public DebuggerException(string message, params object[] args): base(string.Format(message, args)) {}
public DebuggerException(string message, System.Exception inner): base(message, inner) {}
}

8
src/AddIns/Debugger/Debugger.Core/MetaData/DebugPropertyInfo.cs

@ -12,14 +12,16 @@ namespace Debugger.MetaData @@ -12,14 +12,16 @@ namespace Debugger.MetaData
public class DebugPropertyInfo : System.Reflection.PropertyInfo, IDebugMemberInfo, IOverloadable
{
DebugType declaringType;
string name;
MethodInfo getMethod;
MethodInfo setMethod;
internal DebugPropertyInfo(DebugType declaringType, MethodInfo getMethod, MethodInfo setMethod)
internal DebugPropertyInfo(DebugType declaringType, string name, MethodInfo getMethod, MethodInfo setMethod)
{
if (getMethod == null && setMethod == null) throw new ArgumentNullException("Both getter and setter can not be null.");
this.declaringType = declaringType;
this.name = name;
this.getMethod = getMethod;
this.setMethod = setMethod;
}
@ -56,9 +58,7 @@ namespace Debugger.MetaData @@ -56,9 +58,7 @@ namespace Debugger.MetaData
/// <inheritdoc/>
public override string Name {
get {
return (getMethod ?? setMethod).Name.Remove(0,4);
}
get { return name; }
}
/// <summary> Name including the declaring type, return type and parameters </summary>

1
src/AddIns/Debugger/Debugger.Core/MetaData/DebugType.cs

@ -1299,6 +1299,7 @@ namespace Debugger.MetaData @@ -1299,6 +1299,7 @@ namespace Debugger.MetaData
foreach(PropertyProps prop in module.MetaData.EnumPropertyProps((uint)this.MetadataToken)) {
DebugPropertyInfo propInfo = new DebugPropertyInfo(
this,
prop.Name,
prop.GetterMethod != 0x06000000 ? GetMethod(prop.GetterMethod) : null,
prop.SetterMethod != 0x06000000 ? GetMethod(prop.SetterMethod) : null
);

Loading…
Cancel
Save