Browse Source

Skeletons for implementing System.Type

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5096 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 16 years ago
parent
commit
ff4587a500
  1. 6
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj
  2. 106
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugFieldInfo.cs
  3. 68
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugMemberInfo.cs
  4. 135
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugMethodInfo.cs
  5. 36
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugParameterInfo.cs
  6. 134
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugPropertyInfo.cs
  7. 293
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType2.cs

6
src/AddIns/Misc/Debugger/Debugger.Core/Project/Debugger.Core.csproj

@ -220,8 +220,14 @@ @@ -220,8 +220,14 @@
<Compile Include="Src\Interop\MetaData\COR_FIELD_OFFSET.cs" />
<Compile Include="Src\Interop\MetaData\IMetaDataImport.cs" />
<Compile Include="Src\Metadata\BindingFlags.cs" />
<Compile Include="Src\Metadata\DebugFieldInfo.cs" />
<Compile Include="Src\Metadata\DebugMemberInfo.cs" />
<Compile Include="Src\Metadata\DebugMethodInfo.cs" />
<Compile Include="Src\Metadata\DebugParameterInfo.cs" />
<Compile Include="Src\Metadata\DebugPropertyInfo.cs" />
<Compile Include="Src\Metadata\DebugType-Helpers.cs" />
<Compile Include="Src\Metadata\DebugType.cs" />
<Compile Include="Src\Metadata\DebugType2.cs" />
<Compile Include="Src\Metadata\FieldInfo.cs" />
<Compile Include="Src\Metadata\MemberInfo.cs" />
<Compile Include="Src\Metadata\MethodInfo.cs" />

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

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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 abstract class DebugFieldInfo : System.Reflection.FieldInfo
{
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 FieldAttributes Attributes {
get {
throw new NotSupportedException();
}
}
public override RuntimeFieldHandle FieldHandle {
get {
throw new NotSupportedException();
}
}
public override Type FieldType {
get {
throw new NotSupportedException();
}
}
// public override MemberTypes MemberType { get; }
// public virtual Type[] GetOptionalCustomModifiers();
// public virtual object GetRawConstantValue();
// public virtual Type[] GetRequiredCustomModifiers();
public override object GetValue(object obj)
{
throw new NotSupportedException();
}
// public virtual object GetValueDirect(TypedReference obj);
public override void SetValue(object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture)
{
throw new NotSupportedException();
}
// public virtual void SetValueDirect(TypedReference obj, object value);
}
}

68
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugMemberInfo.cs

@ -0,0 +1,68 @@ @@ -0,0 +1,68 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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 DebugMemberInfo: System.Reflection.MemberInfo
{
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();
}
}
}

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

@ -0,0 +1,135 @@ @@ -0,0 +1,135 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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 DebugMethodInfo: System.Reflection.MethodInfo
{
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 virtual Type[] GetGenericArguments();
// public virtual MethodBody GetMethodBody();
// internal virtual RuntimeMethodHandle GetMethodHandle();
public override MethodImplAttributes GetMethodImplementationFlags()
{
throw new NotSupportedException();
}
// internal virtual uint GetOneTimeFlags();
// internal virtual uint GetOneTimeSpecificFlags();
public override ParameterInfo[] GetParameters()
{
throw new NotSupportedException();
}
// internal virtual ParameterInfo[] GetParametersNoCopy();
// internal virtual Type[] GetParameterTypes();
// internal virtual Type GetReturnType();
public override object Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture)
{
throw new NotSupportedException();
}
public override MethodAttributes Attributes {
get {
throw new NotSupportedException();
}
}
// public virtual CallingConventions CallingConvention { get; }
// public virtual bool ContainsGenericParameters { get; }
// public virtual bool IsGenericMethod { get; }
// public virtual bool IsGenericMethodDefinition { get; }
// internal virtual bool IsOverloaded { get; }
public override RuntimeMethodHandle MethodHandle {
get {
throw new NotSupportedException();
}
}
public override MethodInfo GetBaseDefinition()
{
throw new NotSupportedException();
}
// public override Type[] GetGenericArguments();
// public virtual MethodInfo GetGenericMethodDefinition();
// internal virtual MethodInfo GetParentDefinition();
// internal override Type GetReturnType();
// public virtual MethodInfo MakeGenericMethod(params Type[] typeArguments);
// public override bool ContainsGenericParameters { get; }
// public override bool IsGenericMethod { get; }
// public override bool IsGenericMethodDefinition { get; }
// public override MemberTypes MemberType { get; }
// public virtual ParameterInfo ReturnParameter { get; }
// public virtual Type ReturnType { get; }
public override ICustomAttributeProvider ReturnTypeCustomAttributes {
get {
throw new NotSupportedException();
}
}
}
}

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

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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 DebugParameterInfo : System.Reflection.ParameterInfo
{
// public virtual ParameterAttributes Attributes { get; }
// public virtual object DefaultValue { get; }
// public virtual MemberInfo Member { get; }
// public virtual string Name { get; }
// public virtual Type ParameterType { get; }
// public virtual int Position { get; }
// public virtual object RawDefaultValue { get; }
//
// public virtual object[] GetCustomAttributes(bool inherit);
// public virtual object[] GetCustomAttributes(Type attributeType, bool inherit);
// public virtual Type[] GetOptionalCustomModifiers();
// public virtual Type[] GetRequiredCustomModifiers();
// public virtual bool IsDefined(Type attributeType, bool inherit);
}
}

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

@ -0,0 +1,134 @@ @@ -0,0 +1,134 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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();
}
}
}

293
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Metadata/DebugType2.cs

@ -0,0 +1,293 @@ @@ -0,0 +1,293 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="David Srbecký" email="dsrbecky@gmail.com"/>
// <version>$Revision$</version>
// </file>
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 DebugType2: System.Type
{
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 Assembly Assembly {
get {
throw new NotSupportedException();
}
}
public override string AssemblyQualifiedName {
get {
throw new NotSupportedException();
}
}
public override Type BaseType {
get {
throw new NotSupportedException();
}
}
// public virtual bool ContainsGenericParameters { get; }
// public virtual MethodBase DeclaringMethod { get; }
// public override Type DeclaringType { get; }
public override string FullName {
get {
throw new NotSupportedException();
}
}
// public virtual GenericParameterAttributes GenericParameterAttributes { get; }
// public virtual int GenericParameterPosition { get; }
public override Guid GUID {
get {
throw new NotSupportedException();
}
}
// public virtual bool IsGenericParameter { get; }
// public virtual bool IsGenericType { get; }
// public virtual bool IsGenericTypeDefinition { get; }
// internal virtual bool IsSzArray { get; }
// public override MemberTypes MemberType { get; }
public override Module Module {
get {
throw new NotSupportedException();
}
}
public override string Namespace {
get {
throw new NotSupportedException();
}
}
// public override Type ReflectedType { get; }
// public virtual StructLayoutAttribute StructLayoutAttribute { get; }
// public virtual RuntimeTypeHandle TypeHandle { get; }
public override Type UnderlyingSystemType {
get {
throw new NotSupportedException();
}
}
// public virtual Type[] FindInterfaces(TypeFilter filter, object filterCriteria);
// public virtual MemberInfo[] FindMembers(MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria);
// public virtual int GetArrayRank();
protected override TypeAttributes GetAttributeFlagsImpl()
{
throw new NotSupportedException();
}
protected override ConstructorInfo GetConstructorImpl(BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException();
}
public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
// internal virtual string GetDefaultMemberName();
// public virtual MemberInfo[] GetDefaultMembers();
public override Type GetElementType()
{
throw new NotSupportedException();
}
public override EventInfo GetEvent(string name, BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
// public virtual EventInfo[] GetEvents();
public override EventInfo[] GetEvents(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
public override FieldInfo GetField(string name, BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
public override FieldInfo[] GetFields(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
// public virtual Type[] GetGenericArguments();
// public virtual Type[] GetGenericParameterConstraints();
// public virtual Type GetGenericTypeDefinition();
public override Type GetInterface(string name, bool ignoreCase)
{
throw new NotSupportedException();
}
// public virtual InterfaceMapping GetInterfaceMap(Type interfaceType);
public override Type[] GetInterfaces()
{
throw new NotSupportedException();
}
// public virtual MemberInfo[] GetMember(string name, BindingFlags bindingAttr);
// public virtual MemberInfo[] GetMember(string name, MemberTypes type, BindingFlags bindingAttr);
public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
protected override MethodInfo GetMethodImpl(string name, BindingFlags bindingAttr, Binder binder, CallingConventions callConvention, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException();
}
public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
public override Type GetNestedType(string name, BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
public override Type[] GetNestedTypes(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
{
throw new NotSupportedException();
}
protected override PropertyInfo GetPropertyImpl(string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers)
{
throw new NotSupportedException();
}
// internal virtual Type GetRootElementType();
// internal virtual TypeCode GetTypeCodeInternal();
// internal virtual RuntimeTypeHandle GetTypeHandleInternal();
protected override bool HasElementTypeImpl()
{
throw new NotSupportedException();
}
// internal virtual bool HasProxyAttributeImpl();
public override object InvokeMember(string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters)
{
throw new NotSupportedException();
}
protected override bool IsArrayImpl()
{
throw new NotSupportedException();
}
// public virtual bool IsAssignableFrom(Type c);
protected override bool IsByRefImpl()
{
throw new NotSupportedException();
}
protected override bool IsCOMObjectImpl()
{
throw new NotSupportedException();
}
// protected virtual bool IsContextfulImpl();
// public virtual bool IsInstanceOfType(object o);
// protected virtual bool IsMarshalByRefImpl();
protected override bool IsPointerImpl()
{
throw new NotSupportedException();
}
protected override bool IsPrimitiveImpl()
{
throw new NotSupportedException();
}
// public virtual bool IsSubclassOf(Type c);
// protected virtual bool IsValueTypeImpl();
// public virtual Type MakeArrayType();
// public virtual Type MakeArrayType(int rank);
// public virtual Type MakeByRefType();
// public virtual Type MakeGenericType(params Type[] typeArguments);
// public virtual Type MakePointerType();
// public override string ToString();
}
}
Loading…
Cancel
Save