diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
index 6b543ef4a1..644d2c7b9e 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
@@ -223,7 +223,6 @@
-
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs
deleted file mode 100644
index d22932f554..0000000000
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-//
-//
-//
-// $Revision$
-//
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-
-using Debugger.Wrappers.CorDebug;
-using Debugger.Wrappers.MetaData;
-using ICSharpCode.NRefactory.Ast;
-using Mono.Cecil.Signatures;
-
-namespace Debugger.MetaData2
-{
- using System.Reflection;
- public class DebugPropertyInfo : System.Reflection.PropertyInfo
- {
- public override Type DeclaringType {
- get {
- throw new NotSupportedException();
- }
- }
-
- public override MemberTypes MemberType {
- get {
- throw new NotSupportedException();
- }
- }
-
- // public virtual int MetadataToken { get; }
- // internal virtual int MetadataTokenInternal { get; }
- // public virtual Module Module { get; }
-
- public override string Name {
- get {
- throw new NotSupportedException();
- }
- }
-
- public override Type ReflectedType {
- get {
- throw new NotSupportedException();
- }
- }
-
-
- // internal virtual bool CacheEquals(object o);
-
- public override object[] GetCustomAttributes(bool inherit)
- {
- throw new NotSupportedException();
- }
-
- public override object[] GetCustomAttributes(Type attributeType, bool inherit)
- {
- throw new NotSupportedException();
- }
-
- public override bool IsDefined(Type attributeType, bool inherit)
- {
- throw new NotSupportedException();
- }
-
- public override PropertyAttributes Attributes {
- get {
- throw new NotSupportedException();
- }
- }
-
- public override bool CanRead {
- get {
- throw new NotSupportedException();
- }
- }
-
- public override bool CanWrite {
- get {
- throw new NotSupportedException();
- }
- }
-
- // public override MemberTypes MemberType { get; }
-
- public override Type PropertyType {
- get {
- throw new NotSupportedException();
- }
- }
-
- public override MethodInfo[] GetAccessors(bool nonPublic)
- {
- throw new NotSupportedException();
- }
-
- // public virtual object GetConstantValue();
-
- public override MethodInfo GetGetMethod(bool nonPublic)
- {
- throw new NotSupportedException();
- }
-
- public override ParameterInfo[] GetIndexParameters()
- {
- throw new NotSupportedException();
- }
-
- // public virtual Type[] GetOptionalCustomModifiers();
- // public virtual object GetRawConstantValue();
- // public virtual Type[] GetRequiredCustomModifiers();
-
- public override MethodInfo GetSetMethod(bool nonPublic)
- {
- throw new NotSupportedException();
- }
-
- // public virtual object GetValue(object obj, object[] index);
-
- public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
-
- // public virtual void SetValue(object obj, object value, object[] index);
-
- public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
- {
- throw new NotSupportedException();
- }
- }
-}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/PropertyInfo.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/PropertyInfo.cs
index 780bf89ca3..599745765d 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/PropertyInfo.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/PropertyInfo.cs
@@ -7,89 +7,132 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
+using System.Reflection;
+
using Debugger.Wrappers.CorDebug;
using Debugger.Wrappers.MetaData;
namespace Debugger.MetaData
{
- ///
- /// Provides information about a property in a class
- ///
- public class PropertyInfo: MemberInfo
+ public class DebugPropertyInfo : System.Reflection.PropertyInfo
{
+ DebugType declaringType;
MethodInfo getMethod;
MethodInfo setMethod;
- /// Gets a value indicating whether this member has the private access modifier
- public override bool IsPrivate {
- get { return (getMethod ?? setMethod).IsPrivate; }
- }
-
- /// Gets a value indicating whether this member has the internal access modifier
- public override bool IsInternal {
- get { return (getMethod ?? setMethod).IsInternal; }
- }
-
- /// Gets a value indicating whether this member has the protected access modifier
- public override bool IsProtected {
- get { return (getMethod ?? setMethod).IsProtected; }
- }
-
- /// Gets a value indicating whether this member has the public access modifier
- public override bool IsPublic {
- get { return (getMethod ?? setMethod).IsPublic; }
+ internal DebugPropertyInfo(DebugType declaringType, MethodInfo getMethod, MethodInfo setMethod)
+ {
+ if (getMethod == null && setMethod == null) throw new ArgumentNullException("Both getter and setter can not be null.");
+
+ this.declaringType = declaringType;
+ this.getMethod = getMethod;
+ this.setMethod = setMethod;
}
- /// Gets a value indicating whether this property is static
- public override bool IsStatic {
+ public override Type DeclaringType {
get {
- return (getMethod ?? setMethod).IsStatic;
+ return declaringType;
}
}
- /// Gets the metadata token associated with getter (or setter)
- /// of this property
- [Debugger.Tests.Ignore]
public override uint MetadataToken {
get {
return (getMethod ?? setMethod).MetadataToken;
}
}
- /// The type of the property
- public DebugType Type {
+ // public virtual Module Module { get; }
+
+ public override string Name {
get {
- return getMethod.ReturnType;
+ return (getMethod ?? setMethod).Name.Remove(0,4);
}
}
- /// Gets the name of this property
- public override string Name {
+ public override Type ReflectedType {
get {
- return (getMethod ?? setMethod).Name.Remove(0,4);
+ throw new NotSupportedException();
}
}
- internal PropertyInfo(DebugType declaringType, MethodInfo getMethod, MethodInfo setMethod): base(declaringType)
+ public override object[] GetCustomAttributes(bool inherit)
{
- if (getMethod == null && setMethod == null) throw new ArgumentNullException("Both getter and setter can not be null.");
-
- this.getMethod = getMethod;
- this.setMethod = setMethod;
+ throw new NotSupportedException();
}
- /// Get the get accessor of the property
- public MethodInfo GetMethod {
+ public override object[] GetCustomAttributes(Type attributeType, bool inherit)
+ {
+ throw new NotSupportedException();
+ }
+
+ public override bool IsDefined(Type attributeType, bool inherit)
+ {
+ throw new NotSupportedException();
+ }
+
+ public override PropertyAttributes Attributes {
get {
- return getMethod;
+ throw new NotSupportedException();
}
}
- /// Get the set accessor of the property
- public MethodInfo SetMethod {
+ public override bool CanRead {
get {
- return setMethod;
+ return getMethod != null;
}
}
+
+ public override bool CanWrite {
+ get {
+ return setMethod != null;
+ }
+ }
+
+ public override Type PropertyType {
+ get {
+ return getMethod.ReturnType;
+ }
+ }
+
+ public override MethodInfo[] GetAccessors(bool nonPublic)
+ {
+ throw new NotSupportedException();
+ }
+
+ // public virtual object GetConstantValue();
+
+ public override MethodInfo GetGetMethod(bool nonPublic)
+ {
+ return getMethod;
+ }
+
+ public override ParameterInfo[] GetIndexParameters()
+ {
+ throw new NotSupportedException();
+ }
+
+ // public virtual Type[] GetOptionalCustomModifiers();
+ // public virtual object GetRawConstantValue();
+ // public virtual Type[] GetRequiredCustomModifiers();
+
+ public override MethodInfo GetSetMethod(bool nonPublic)
+ {
+ return setMethod;
+ }
+
+ // public virtual object GetValue(object obj, object[] index);
+
+ public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+
+ // public virtual void SetValue(object obj, object value, object[] index);
+
+ public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
}
}
diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
index c16c66d025..e232f82251 100644
--- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
+++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Values/Value.Object.cs
@@ -5,11 +5,12 @@
// $Revision$
//
-using ICSharpCode.NRefactory.Ast;
using System;
using System.Collections.Generic;
using Debugger.MetaData;
using Debugger.Wrappers.CorDebug;
+using ICSharpCode.NRefactory.Ast;
+using System.Reflection;
namespace Debugger
{