Browse Source

Added <inheritdoc/> to metadata members

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5114 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 17 years ago
parent
commit
b0fabf82c7
  1. 14
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugFieldInfo.cs
  2. 4
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugLocalVariableInfo.cs
  3. 21
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugMethodInfo.cs
  4. 5
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugParameterInfo.cs
  5. 19
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs
  6. 53
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

14
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugFieldInfo.cs

@ -27,6 +27,7 @@ namespace Debugger.MetaData
this.fieldProps = fieldProps; this.fieldProps = fieldProps;
} }
/// <inheritdoc/>
public override Type DeclaringType { public override Type DeclaringType {
get { return declaringType; } get { return declaringType; }
} }
@ -46,45 +47,55 @@ namespace Debugger.MetaData
get { return declaringType.DebugModule; } get { return declaringType.DebugModule; }
} }
/// <inheritdoc/>
public override int MetadataToken { public override int MetadataToken {
get { return (int)fieldProps.Token; } get { return (int)fieldProps.Token; }
} }
/// <inheritdoc/>
public override System.Reflection.Module Module { public override System.Reflection.Module Module {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override string Name { public override string Name {
get { return fieldProps.Name; } get { return fieldProps.Name; }
} }
/// <inheritdoc/>
public override Type ReflectedType { public override Type ReflectedType {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(bool inherit) public override object[] GetCustomAttributes(bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(Type attributeType, bool inherit) public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override bool IsDefined(Type attributeType, bool inherit) public override bool IsDefined(Type attributeType, bool inherit)
{ {
return DebugType.IsDefined(this, inherit, attributeType); return DebugType.IsDefined(this, inherit, attributeType);
} }
/// <inheritdoc/>
public override FieldAttributes Attributes { public override FieldAttributes Attributes {
get { return (FieldAttributes)fieldProps.Flags; } get { return (FieldAttributes)fieldProps.Flags; }
} }
/// <inheritdoc/>
public override RuntimeFieldHandle FieldHandle { public override RuntimeFieldHandle FieldHandle {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override Type FieldType { public override Type FieldType {
get { get {
SignatureReader sigReader = new SignatureReader(fieldProps.SigBlob.GetData()); SignatureReader sigReader = new SignatureReader(fieldProps.SigBlob.GetData());
@ -97,16 +108,19 @@ namespace Debugger.MetaData
// public virtual object GetRawConstantValue(); // public virtual object GetRawConstantValue();
// public virtual Type[] GetRequiredCustomModifiers(); // public virtual Type[] GetRequiredCustomModifiers();
/// <inheritdoc/>
public override object GetValue(object obj) public override object GetValue(object obj)
{ {
return Value.GetFieldValue((Value)obj, this); return Value.GetFieldValue((Value)obj, this);
} }
/// <inheritdoc/>
public override void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, Binder binder, CultureInfo culture) public override void SetValue(object obj, object value, System.Reflection.BindingFlags invokeAttr, Binder binder, CultureInfo culture)
{ {
Value.SetFieldValue((Value)obj, this, (Value)value); Value.SetFieldValue((Value)obj, this, (Value)value);
} }
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
return this.FieldType + " " + this.Name; return this.FieldType + " " + this.Name;

4
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugLocalVariableInfo.cs

@ -25,14 +25,17 @@ namespace Debugger.MetaData
int localIndex; int localIndex;
DebugType localType; DebugType localType;
/// <inheritdoc/>
public override int LocalIndex { public override int LocalIndex {
get { return localIndex; } get { return localIndex; }
} }
/// <inheritdoc/>
public override Type LocalType { public override Type LocalType {
get { return localType; } get { return localType; }
} }
/// <inheritdoc/>
public override bool IsPinned { public override bool IsPinned {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
@ -54,6 +57,7 @@ namespace Debugger.MetaData
return getter(context); return getter(context);
} }
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
string msg = this.LocalType + " " + this.Name; string msg = this.LocalType + " " + this.Name;

21
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugMethodInfo.cs

@ -31,6 +31,7 @@ namespace Debugger.MetaData
this.methodProps = methodProps; this.methodProps = methodProps;
} }
/// <inheritdoc/>
public override Type DeclaringType { public override Type DeclaringType {
get { return declaringType; } get { return declaringType; }
} }
@ -50,10 +51,12 @@ namespace Debugger.MetaData
get { return declaringType.DebugModule; } get { return declaringType.DebugModule; }
} }
/// <inheritdoc/>
public override int MetadataToken { public override int MetadataToken {
get { return (int)methodProps.Token; } get { return (int)methodProps.Token; }
} }
/// <inheritdoc/>
public override System.Reflection.Module Module { public override System.Reflection.Module Module {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
@ -80,24 +83,29 @@ namespace Debugger.MetaData
} }
} }
/// <inheritdoc/>
public override string Name { public override string Name {
get { return methodProps.Name; } get { return methodProps.Name; }
} }
/// <inheritdoc/>
public override Type ReflectedType { public override Type ReflectedType {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(bool inherit) public override object[] GetCustomAttributes(bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(Type attributeType, bool inherit) public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override bool IsDefined(Type attributeType, bool inherit) public override bool IsDefined(Type attributeType, bool inherit)
{ {
return DebugType.IsDefined(this, inherit, attributeType); return DebugType.IsDefined(this, inherit, attributeType);
@ -106,11 +114,13 @@ namespace Debugger.MetaData
// public virtual Type[] GetGenericArguments(); // public virtual Type[] GetGenericArguments();
// public virtual MethodBody GetMethodBody(); // public virtual MethodBody GetMethodBody();
/// <inheritdoc/>
public override MethodImplAttributes GetMethodImplementationFlags() public override MethodImplAttributes GetMethodImplementationFlags()
{ {
return (MethodImplAttributes)methodProps.ImplFlags; return (MethodImplAttributes)methodProps.ImplFlags;
} }
/// <inheritdoc/>
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
{ {
List<Value> args = new List<Value>(); List<Value> args = new List<Value>();
@ -120,28 +130,34 @@ namespace Debugger.MetaData
return Eval.InvokeMethod(this, (Value)obj, args.ToArray()); return Eval.InvokeMethod(this, (Value)obj, args.ToArray());
} }
/// <inheritdoc/>
public override MethodAttributes Attributes { public override MethodAttributes Attributes {
get { return (MethodAttributes)methodProps.Flags; } get { return (MethodAttributes)methodProps.Flags; }
} }
// public virtual CallingConventions CallingConvention { get; } // public virtual CallingConventions CallingConvention { get; }
/// <inheritdoc/>
public override bool ContainsGenericParameters { public override bool ContainsGenericParameters {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override bool IsGenericMethod { public override bool IsGenericMethod {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override bool IsGenericMethodDefinition { public override bool IsGenericMethodDefinition {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override RuntimeMethodHandle MethodHandle { public override RuntimeMethodHandle MethodHandle {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override MethodInfo GetBaseDefinition() public override MethodInfo GetBaseDefinition()
{ {
throw new NotSupportedException(); throw new NotSupportedException();
@ -152,6 +168,7 @@ namespace Debugger.MetaData
// public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments); // public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments);
// public override bool ContainsGenericParameters { get; } // public override bool ContainsGenericParameters { get; }
/// <inheritdoc/>
public override Type ReturnType { public override Type ReturnType {
get { get {
if (this.MethodDefSig.RetType.Void) return null; if (this.MethodDefSig.RetType.Void) return null;
@ -159,6 +176,7 @@ namespace Debugger.MetaData
} }
} }
/// <inheritdoc/>
public override ParameterInfo ReturnParameter { public override ParameterInfo ReturnParameter {
get { get {
if (this.MethodDefSig.RetType.Void) return null; if (this.MethodDefSig.RetType.Void) return null;
@ -166,6 +184,7 @@ namespace Debugger.MetaData
} }
} }
/// <inheritdoc/>
public override ICustomAttributeProvider ReturnTypeCustomAttributes { public override ICustomAttributeProvider ReturnTypeCustomAttributes {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
@ -189,6 +208,7 @@ namespace Debugger.MetaData
ParameterInfo[] parameters; ParameterInfo[] parameters;
/// <inheritdoc/>
public override ParameterInfo[] GetParameters() public override ParameterInfo[] GetParameters()
{ {
if (parameters == null) { if (parameters == null) {
@ -591,6 +611,7 @@ namespace Debugger.MetaData
return new Value(context.AppDomain, corVal); return new Value(context.AppDomain, corVal);
} }
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
string txt = string.Empty; string txt = string.Empty;

5
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugParameterInfo.cs

@ -23,18 +23,22 @@ namespace Debugger.MetaData
Type parameterType; Type parameterType;
int position; int position;
/// <inheritdoc/>
public override MemberInfo Member { public override MemberInfo Member {
get { return member; } get { return member; }
} }
/// <inheritdoc/>
public override string Name { public override string Name {
get { return name; } get { return name; }
} }
/// <inheritdoc/>
public override Type ParameterType { public override Type ParameterType {
get { return parameterType; } get { return parameterType; }
} }
/// <inheritdoc/>
public override int Position { public override int Position {
get { return position; } get { return position; }
} }
@ -57,6 +61,7 @@ namespace Debugger.MetaData
// public virtual Type[] GetRequiredCustomModifiers(); // public virtual Type[] GetRequiredCustomModifiers();
// public virtual bool IsDefined(Type attributeType, bool inherit); // public virtual bool IsDefined(Type attributeType, bool inherit);
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
return this.ParameterType + " " + this.Name; return this.ParameterType + " " + this.Name;

19
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs

@ -30,6 +30,7 @@ namespace Debugger.MetaData
this.setMethod = setMethod; this.setMethod = setMethod;
} }
/// <inheritdoc/>
public override Type DeclaringType { public override Type DeclaringType {
get { return declaringType; } get { return declaringType; }
} }
@ -49,51 +50,62 @@ namespace Debugger.MetaData
get { return declaringType.DebugModule; } get { return declaringType.DebugModule; }
} }
/// <inheritdoc/>
public override int MetadataToken { public override int MetadataToken {
get { return 0; } get { return 0; }
} }
/// <inheritdoc/>
public override System.Reflection.Module Module { public override System.Reflection.Module Module {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override string Name { public override string Name {
get { get {
return (getMethod ?? setMethod).Name.Remove(0,4); return (getMethod ?? setMethod).Name.Remove(0,4);
} }
} }
/// <inheritdoc/>
public override Type ReflectedType { public override Type ReflectedType {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(bool inherit) public override object[] GetCustomAttributes(bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(Type attributeType, bool inherit) public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override bool IsDefined(Type attributeType, bool inherit) public override bool IsDefined(Type attributeType, bool inherit)
{ {
return DebugType.IsDefined(this, inherit, attributeType); return DebugType.IsDefined(this, inherit, attributeType);
} }
/// <inheritdoc/>
public override PropertyAttributes Attributes { public override PropertyAttributes Attributes {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override bool CanRead { public override bool CanRead {
get { return getMethod != null; } get { return getMethod != null; }
} }
/// <inheritdoc/>
public override bool CanWrite { public override bool CanWrite {
get { return setMethod != null; } get { return setMethod != null; }
} }
/// <inheritdoc/>
public override Type PropertyType { public override Type PropertyType {
get { get {
if (getMethod != null) { if (getMethod != null) {
@ -104,6 +116,7 @@ namespace Debugger.MetaData
} }
} }
/// <inheritdoc/>
public override MethodInfo[] GetAccessors(bool nonPublic) public override MethodInfo[] GetAccessors(bool nonPublic)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
@ -111,11 +124,13 @@ namespace Debugger.MetaData
// public virtual object GetConstantValue(); // public virtual object GetConstantValue();
/// <inheritdoc/>
public override MethodInfo GetGetMethod(bool nonPublic) public override MethodInfo GetGetMethod(bool nonPublic)
{ {
return getMethod; return getMethod;
} }
/// <inheritdoc/>
public override ParameterInfo[] GetIndexParameters() public override ParameterInfo[] GetIndexParameters()
{ {
if (GetGetMethod() != null) { if (GetGetMethod() != null) {
@ -129,11 +144,13 @@ namespace Debugger.MetaData
// public virtual object GetRawConstantValue(); // public virtual object GetRawConstantValue();
// public virtual Type[] GetRequiredCustomModifiers(); // public virtual Type[] GetRequiredCustomModifiers();
/// <inheritdoc/>
public override MethodInfo GetSetMethod(bool nonPublic) public override MethodInfo GetSetMethod(bool nonPublic)
{ {
return setMethod; return setMethod;
} }
/// <inheritdoc/>
public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) public override object GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
{ {
List<Value> args = new List<Value>(); List<Value> args = new List<Value>();
@ -143,6 +160,7 @@ namespace Debugger.MetaData
return Value.GetPropertyValue((Value)obj, this, args.ToArray()); return Value.GetPropertyValue((Value)obj, this, args.ToArray());
} }
/// <inheritdoc/>
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
{ {
List<Value> args = new List<Value>(); List<Value> args = new List<Value>();
@ -166,6 +184,7 @@ namespace Debugger.MetaData
} }
} }
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
return this.PropertyType + " " + this.Name; return this.PropertyType + " " + this.Name;

53
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType.cs

@ -55,6 +55,7 @@ namespace Debugger.MetaData
get { return corType; } get { return corType; }
} }
/// <inheritdoc/>
public override Type DeclaringType { public override Type DeclaringType {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
@ -74,32 +75,39 @@ namespace Debugger.MetaData
get { return module; } get { return module; }
} }
/// <inheritdoc/>
public override int MetadataToken { public override int MetadataToken {
get { return (int)classProps.Token; } get { return (int)classProps.Token; }
} }
/// <inheritdoc/>
public override System.Reflection.Module Module { public override System.Reflection.Module Module {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override string Name { public override string Name {
get { return name; } get { return name; }
} }
/// <inheritdoc/>
public override Type ReflectedType { public override Type ReflectedType {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(bool inherit) public override object[] GetCustomAttributes(bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override object[] GetCustomAttributes(Type attributeType, bool inherit) public override object[] GetCustomAttributes(Type attributeType, bool inherit)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override bool IsDefined(Type attributeType, bool inherit) public override bool IsDefined(Type attributeType, bool inherit)
{ {
return IsDefined(this, inherit, attributeType); return IsDefined(this, inherit, attributeType);
@ -130,14 +138,17 @@ namespace Debugger.MetaData
return false; return false;
} }
/// <inheritdoc/>
public override Assembly Assembly { public override Assembly Assembly {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override string AssemblyQualifiedName { public override string AssemblyQualifiedName {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override Type BaseType { public override Type BaseType {
get { get {
// corType.Base *sometimes* does not work for object and can cause "Value does not fall within the expected range." exception // corType.Base *sometimes* does not work for object and can cause "Value does not fall within the expected range." exception
@ -167,10 +178,12 @@ namespace Debugger.MetaData
// public virtual bool ContainsGenericParameters { get; } // public virtual bool ContainsGenericParameters { get; }
// public virtual MethodBase DeclaringMethod { get; } // public virtual MethodBase DeclaringMethod { get; }
/// <inheritdoc/>
public override string FullName { public override string FullName {
get { return fullName; } get { return fullName; }
} }
/// <inheritdoc/>
public override Guid GUID { public override Guid GUID {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
@ -180,26 +193,31 @@ namespace Debugger.MetaData
// public virtual bool IsGenericParameter { get; } // public virtual bool IsGenericParameter { get; }
// public virtual bool IsGenericTypeDefinition { get; } // public virtual bool IsGenericTypeDefinition { get; }
/// <inheritdoc/>
public override bool IsGenericType { public override bool IsGenericType {
get { get {
return this.GetGenericArguments().Length > 0; return this.GetGenericArguments().Length > 0;
} }
} }
/// <inheritdoc/>
public override string Namespace { public override string Namespace {
get { return ns; } get { return ns; }
} }
// public virtual StructLayoutAttribute StructLayoutAttribute { get; } // public virtual StructLayoutAttribute StructLayoutAttribute { get; }
/// <inheritdoc/>
public override RuntimeTypeHandle TypeHandle { public override RuntimeTypeHandle TypeHandle {
get { throw new NotSupportedException(); } get { throw new NotSupportedException(); }
} }
/// <inheritdoc/>
public override Type UnderlyingSystemType { public override Type UnderlyingSystemType {
get { return this; } get { return this; }
} }
/// <inheritdoc/>
public override int GetArrayRank() public override int GetArrayRank()
{ {
if (!IsArray) throw new ArgumentException("Type is not array"); if (!IsArray) throw new ArgumentException("Type is not array");
@ -207,17 +225,20 @@ namespace Debugger.MetaData
return (int)corType.Rank; return (int)corType.Rank;
} }
/// <inheritdoc/>
protected override TypeAttributes GetAttributeFlagsImpl() protected override TypeAttributes GetAttributeFlagsImpl()
{ {
return (TypeAttributes)classProps.Flags; return (TypeAttributes)classProps.Flags;
} }
/// <inheritdoc/>
protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers) protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{ {
// TODO // TODO
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr) public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
@ -225,6 +246,7 @@ namespace Debugger.MetaData
// public virtual MemberInfo[] GetDefaultMembers(); // public virtual MemberInfo[] GetDefaultMembers();
/// <inheritdoc/>
public override Type GetElementType() public override Type GetElementType()
{ {
return elementType; return elementType;
@ -305,6 +327,7 @@ namespace Debugger.MetaData
return results.ToArray(); return results.ToArray();
} }
/// <inheritdoc/>
public override EventInfo GetEvent(string name, BindingFlags bindingAttr) public override EventInfo GetEvent(string name, BindingFlags bindingAttr)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
@ -312,21 +335,25 @@ namespace Debugger.MetaData
// public virtual EventInfo[] GetEvents(); // public virtual EventInfo[] GetEvents();
/// <inheritdoc/>
public override EventInfo[] GetEvents(BindingFlags bindingAttr) public override EventInfo[] GetEvents(BindingFlags bindingAttr)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override FieldInfo GetField(string name, BindingFlags bindingAttr) public override FieldInfo GetField(string name, BindingFlags bindingAttr)
{ {
return GetMember<FieldInfo>(name, bindingAttr, null); return GetMember<FieldInfo>(name, bindingAttr, null);
} }
/// <inheritdoc/>
public override FieldInfo[] GetFields(BindingFlags bindingAttr) public override FieldInfo[] GetFields(BindingFlags bindingAttr)
{ {
return GetMembers<FieldInfo>(null, bindingAttr, null); return GetMembers<FieldInfo>(null, bindingAttr, null);
} }
/// <inheritdoc/>
public override Type[] GetGenericArguments() public override Type[] GetGenericArguments()
{ {
return genericArguments.ToArray(); return genericArguments.ToArray();
@ -345,6 +372,7 @@ namespace Debugger.MetaData
// public virtual Type[] GetGenericParameterConstraints(); // public virtual Type[] GetGenericParameterConstraints();
// public virtual Type GetGenericTypeDefinition(); // public virtual Type GetGenericTypeDefinition();
/// <inheritdoc/>
public override Type GetInterface(string name, bool ignoreCase) public override Type GetInterface(string name, bool ignoreCase)
{ {
foreach(DebugType inter in this.GetInterfaces()) { foreach(DebugType inter in this.GetInterfaces()) {
@ -361,16 +389,19 @@ namespace Debugger.MetaData
// public virtual InterfaceMapping GetInterfaceMap(Type interfaceType); // public virtual InterfaceMapping GetInterfaceMap(Type interfaceType);
/// <inheritdoc/>
public override Type[] GetInterfaces() public override Type[] GetInterfaces()
{ {
return this.interfaces.ToArray(); return this.interfaces.ToArray();
} }
/// <inheritdoc/>
public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr) public override MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr)
{ {
return GetMembers<MemberInfo>(name, bindingAttr, delegate(MemberInfo info) { return (info.MemberType & type) != 0; }); return GetMembers<MemberInfo>(name, bindingAttr, delegate(MemberInfo info) { return (info.MemberType & type) != 0; });
} }
/// <inheritdoc/>
public override MemberInfo[] GetMembers(BindingFlags bindingAttr) public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
{ {
return GetMembers<MemberInfo>(null, bindingAttr, null); return GetMembers<MemberInfo>(null, bindingAttr, null);
@ -394,6 +425,7 @@ namespace Debugger.MetaData
return null; return null;
} }
/// <inheritdoc/>
protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] paramTypes, ParameterModifier[] modifiers) protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] paramTypes, ParameterModifier[] modifiers)
{ {
// TODO: Finish // TODO: Finish
@ -418,16 +450,19 @@ namespace Debugger.MetaData
return GetMembers<MethodInfo>(name, bindingAttr, null); return GetMembers<MethodInfo>(name, bindingAttr, null);
} }
/// <inheritdoc/>
public override MethodInfo[] GetMethods(BindingFlags bindingAttr) public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
{ {
return GetMembers<MethodInfo>(null, bindingAttr, null); return GetMembers<MethodInfo>(null, bindingAttr, null);
} }
/// <inheritdoc/>
public override Type GetNestedType(string name, BindingFlags bindingAttr) public override Type GetNestedType(string name, BindingFlags bindingAttr)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override Type[] GetNestedTypes(BindingFlags bindingAttr) public override Type[] GetNestedTypes(BindingFlags bindingAttr)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
@ -446,38 +481,45 @@ namespace Debugger.MetaData
}); });
} }
/// <inheritdoc/>
public override PropertyInfo[] GetProperties(BindingFlags bindingAttr) public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
{ {
return GetMembers<PropertyInfo>(null, bindingAttr, null); return GetMembers<PropertyInfo>(null, bindingAttr, null);
} }
/// <inheritdoc/>
protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
{ {
// TODO: Finsih // TODO: Finsih
return GetMember<PropertyInfo>(name, bindingAttr, null); return GetMember<PropertyInfo>(name, bindingAttr, null);
} }
/// <inheritdoc/>
protected override bool HasElementTypeImpl() protected override bool HasElementTypeImpl()
{ {
return elementType != null; return elementType != null;
} }
/// <inheritdoc/>
public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
protected override bool IsArrayImpl() protected override bool IsArrayImpl()
{ {
return corElementType == CorElementType.ARRAY || return corElementType == CorElementType.ARRAY ||
corElementType == CorElementType.SZARRAY; corElementType == CorElementType.SZARRAY;
} }
/// <inheritdoc/>
protected override bool IsByRefImpl() protected override bool IsByRefImpl()
{ {
return corElementType == CorElementType.BYREF; return corElementType == CorElementType.BYREF;
} }
/// <inheritdoc/>
protected override bool IsPointerImpl() protected override bool IsPointerImpl()
{ {
return corElementType == CorElementType.PTR; return corElementType == CorElementType.PTR;
@ -495,6 +537,7 @@ namespace Debugger.MetaData
// } // }
// } // }
/// <inheritdoc/>
protected override bool IsValueTypeImpl() protected override bool IsValueTypeImpl()
{ {
// ValueType and Enum are exceptions and are threated as classes // ValueType and Enum are exceptions and are threated as classes
@ -503,6 +546,7 @@ namespace Debugger.MetaData
this.IsSubclassOf(this.AppDomain.ValueType); this.IsSubclassOf(this.AppDomain.ValueType);
} }
/// <inheritdoc/>
public override bool IsSubclassOf(Type superType) public override bool IsSubclassOf(Type superType)
{ {
if (!(superType is DebugType)) { if (!(superType is DebugType)) {
@ -511,11 +555,13 @@ namespace Debugger.MetaData
return base.IsSubclassOf(superType); return base.IsSubclassOf(superType);
} }
/// <inheritdoc/>
protected override bool IsCOMObjectImpl() protected override bool IsCOMObjectImpl()
{ {
throw new NotSupportedException(); throw new NotSupportedException();
} }
/// <inheritdoc/>
public override bool IsInstanceOfType(object o) public override bool IsInstanceOfType(object o)
{ {
if (o == null) return false; if (o == null) return false;
@ -523,6 +569,7 @@ namespace Debugger.MetaData
return this.IsAssignableFrom(((Value)o).Type); return this.IsAssignableFrom(((Value)o).Type);
} }
/// <inheritdoc/>
public override bool IsAssignableFrom(Type c) public override bool IsAssignableFrom(Type c)
{ {
// TODO: Finsih // TODO: Finsih
@ -539,6 +586,7 @@ namespace Debugger.MetaData
get { return primitiveType; } get { return primitiveType; }
} }
/// <inheritdoc/>
protected override bool IsPrimitiveImpl() protected override bool IsPrimitiveImpl()
{ {
return this.PrimitiveType != null; return this.PrimitiveType != null;
@ -757,24 +805,28 @@ namespace Debugger.MetaData
// public virtual Type MakeGenericType(params Type[] typeArguments); // public virtual Type MakeGenericType(params Type[] typeArguments);
/// <inheritdoc/>
public override Type MakeArrayType(int rank) public override Type MakeArrayType(int rank)
{ {
ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.ARRAY, (uint)rank, this.CorType); ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.ARRAY, (uint)rank, this.CorType);
return CreateFromCorType(this.AppDomain, res); return CreateFromCorType(this.AppDomain, res);
} }
/// <inheritdoc/>
public override Type MakeArrayType() public override Type MakeArrayType()
{ {
ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.SZARRAY, 1, this.CorType); ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.SZARRAY, 1, this.CorType);
return CreateFromCorType(this.AppDomain, res); return CreateFromCorType(this.AppDomain, res);
} }
/// <inheritdoc/>
public override Type MakePointerType() public override Type MakePointerType()
{ {
ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.PTR, 0, this.CorType); ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.PTR, 0, this.CorType);
return CreateFromCorType(this.AppDomain, res); return CreateFromCorType(this.AppDomain, res);
} }
/// <inheritdoc/>
public override Type MakeByRefType() public override Type MakeByRefType()
{ {
ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.BYREF, 0, this.CorType); ICorDebugType res = this.AppDomain.CorAppDomain.CastTo<ICorDebugAppDomain2>().GetArrayOrPointerType((uint)CorElementType.BYREF, 0, this.CorType);
@ -1031,6 +1083,7 @@ namespace Debugger.MetaData
membersByToken[member.MetadataToken] = member; membersByToken[member.MetadataToken] = member;
} }
/// <inheritdoc/>
public override string ToString() public override string ToString()
{ {
return this.FullName; return this.FullName;

Loading…
Cancel
Save