Added type forwarder API to the Module.

This commit is contained in:
Mike Krüger 2013-06-06 07:42:29 +02:00
Родитель 17989a4a81
Коммит ef37d56973
3 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -1612,6 +1612,11 @@ namespace IKVM.Reflection.Emit
throw new NotImplementedException(); throw new NotImplementedException();
} }
public override Type[] __GetTypeForwarders ()
{
throw new NotImplementedException ();
}
public int __AddModule(int flags, string name, byte[] hash) public int __AddModule(int flags, string name, byte[] hash)
{ {
FileTable.Record file = new FileTable.Record(); FileTable.Record file = new FileTable.Record();

Просмотреть файл

@ -488,6 +488,7 @@ namespace IKVM.Reflection
public abstract Type[] __GetReferencedTypes(); public abstract Type[] __GetReferencedTypes();
public abstract Type[] __GetExportedTypes(); public abstract Type[] __GetExportedTypes();
public abstract Type[] __GetTypeForwarders();
public virtual bool __IsMissing public virtual bool __IsMissing
{ {
@ -645,6 +646,11 @@ namespace IKVM.Reflection
throw NotSupportedException(); throw NotSupportedException();
} }
public override Type[] __GetTypeForwarders ()
{
throw NotSupportedException();
}
protected sealed override long GetImageBaseImpl() protected sealed override long GetImageBaseImpl()
{ {
throw NotSupportedException(); throw NotSupportedException();

Просмотреть файл

@ -1109,6 +1109,16 @@ namespace IKVM.Reflection.Reader
return arr; return arr;
} }
public override Type[] __GetTypeForwarders ()
{
Type[] forwarded =new Type[forwardedTypes.Count];
int i = 0;
foreach (var kv in forwardedTypes) {
forwarded [i++] = kv.Value.GetType (this);
}
return forwarded;
}
private Type ResolveExportedType(int index) private Type ResolveExportedType(int index)
{ {
TypeName typeName = GetTypeName(ExportedType.records[index].TypeNamespace, ExportedType.records[index].TypeName); TypeName typeName = GetTypeName(ExportedType.records[index].TypeNamespace, ExportedType.records[index].TypeName);