diff options
author | jfrijters <jfrijters> | 2011-03-08 09:43:01 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-03-08 09:43:01 +0300 |
commit | 602e60e74cf5bf23fe71a9cb710a853ba932de12 (patch) | |
tree | a6f20a6cc99c20e32a2c3c58f2a333c62c252555 /reflect/Emit | |
parent | 1c8b1c0cd5f334a21dbf936ebf6c8f3f9a7032aa (diff) |
Introduced base class for virtual Module classes to have common place to implement abstract Module methods that aren't supported.
Diffstat (limited to 'reflect/Emit')
-rw-r--r-- | reflect/Emit/AssemblyBuilder.cs | 56 |
1 files changed, 3 insertions, 53 deletions
diff --git a/reflect/Emit/AssemblyBuilder.cs b/reflect/Emit/AssemblyBuilder.cs index f07a029d..823c0599 100644 --- a/reflect/Emit/AssemblyBuilder.cs +++ b/reflect/Emit/AssemblyBuilder.cs @@ -641,7 +641,7 @@ namespace IKVM.Reflection.Emit } } - sealed class ManifestModule : Module + sealed class ManifestModule : NonPEModule { private readonly AssemblyBuilder assembly; private readonly Guid guid = Guid.NewGuid(); @@ -686,64 +686,14 @@ namespace IKVM.Reflection.Emit get { return guid; } } - public override Type ResolveType(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - { - throw new ArgumentException(); - } - - public override MethodBase ResolveMethod(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - { - throw new ArgumentException(); - } - - public override FieldInfo ResolveField(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - { - throw new ArgumentException(); - } - - public override MemberInfo ResolveMember(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) - { - throw new ArgumentException(); - } - - public override string ResolveString(int metadataToken) - { - throw new ArgumentException(); - } - - public override Type[] __ResolveOptionalParameterTypes(int metadataToken) - { - throw new ArgumentException(); - } - public override string ScopeName { get { return "RefEmit_InMemoryManifestModule"; } } - public override AssemblyName[] __GetReferencedAssemblies() - { - throw new InvalidOperationException(); - } - - public override string[] __GetReferencedModules() - { - throw new InvalidOperationException(); - } - - internal override Type GetModuleType() - { - throw new InvalidOperationException(); - } - - internal override IKVM.Reflection.Reader.ByteReader GetBlob(int blobIndex) - { - throw new InvalidOperationException(); - } - - protected override long GetImageBaseImpl() + protected override Exception NotSupportedException() { - throw new InvalidOperationException(); + return new InvalidOperationException(); } } } |