public override void VisitAssemblyNameReference(AssemblyNameReference name) { byte [] pkortoken; if (name.PublicKey != null && name.PublicKey.Length > 0) { pkortoken = name.PublicKey; } else if (name.PublicKeyToken != null && name.PublicKeyToken.Length > 0) { pkortoken = name.PublicKeyToken; } else { pkortoken = new byte [0]; } AssemblyRefTable arTable = m_tableWriter.GetAssemblyRefTable(); AssemblyRefRow arRow = m_rowWriter.CreateAssemblyRefRow( (ushort)name.Version.Major, (ushort)name.Version.Minor, (ushort)name.Version.Build, (ushort)name.Version.Revision, name.Flags, m_mdWriter.AddBlob(pkortoken), m_mdWriter.AddString(name.Name), m_mdWriter.AddString(name.Culture), m_mdWriter.AddBlob(name.Hash)); arTable.Rows.Add(arRow); }
private void PatchAssemblyRef(ref byte[] blobHeap) { AssemblyRefTable assemblyRefs = module.AssemblyRef; for (int i = 0; i < assemblyRefs.records.Length; i++) { if (module.GetString(assemblyRefs.records[i].Name) == "mscorlib") { Version ver = GetMscorlibVersion(); assemblyRefs.records[i].MajorVersion = (ushort)ver.Major; assemblyRefs.records[i].MinorVersion = (ushort)ver.Minor; assemblyRefs.records[i].BuildNumber = (ushort)ver.Build; assemblyRefs.records[i].RevisionNumber = (ushort)ver.Revision; break; } } int publicKeyTokenMicrosoft = AddBlob(ref blobHeap, new byte[] { 0xB0, 0x3F, 0x5F, 0x7F, 0x11, 0xD5, 0x0A, 0x3A }); int publicKeyTokenEcma = AddBlob(ref blobHeap, new byte[] { 0xB7, 0x7A, 0x5C, 0x56, 0x19, 0x34, 0xE0, 0x89 }); assemblyRefTokens[(int)ProjectionAssembly.System_Runtime] = AddAssemblyReference("System.Runtime", publicKeyTokenMicrosoft); assemblyRefTokens[(int)ProjectionAssembly.System_Runtime_InteropServices_WindowsRuntime] = AddAssemblyReference("System.Runtime.InteropServices.WindowsRuntime", publicKeyTokenMicrosoft); assemblyRefTokens[(int)ProjectionAssembly.System_ObjectModel] = AddAssemblyReference("System.ObjectModel", publicKeyTokenMicrosoft); assemblyRefTokens[(int)ProjectionAssembly.System_Runtime_WindowsRuntime] = AddAssemblyReference("System.Runtime.WindowsRuntime", publicKeyTokenEcma); assemblyRefTokens[(int)ProjectionAssembly.System_Runtime_WindowsRuntime_UI_Xaml] = AddAssemblyReference("System.Runtime.WindowsRuntime.UI.Xaml", publicKeyTokenEcma); }
public AssemblyLoader() { _signatureResolver = new SignatureResolver(this); _assemblyTable = new AssemblyTable(this); Const = new ConstantTable(this); Files = new FileTable(this); ManifestResources = new ManifestResourceTable(this); Modules = new ModuleTable(this); ModuleRefs = new ModuleRefTable(this); AssemblyRefs = new AssemblyRefTable(this); TypeRefs = new TypeRefTable(this); MemberRefs = new MemberRefTable(this); _typeSpec = new TypeSpecTable(this); _methodSpec = new MethodSpecTable(this); Parameters = new ParamTable(this); Fields = new FieldTable(this); Properties = new PropertyTable(this); Events = new EventTable(this); GenericParameters = new GenericParamTable(this); Methods = new MethodTable(this); Types = new TypeTable(this); }
private int FindMscorlibAssemblyRefNoProjection() { for (int i = 1; i <= AssemblyRefTable.NumberOfNonVirtualRows; i++) { if (StringStream.EqualsRaw(AssemblyRefTable.GetName(i), "mscorlib")) { return(i); } } throw new BadImageFormatException(SR.WinMDMissingMscorlibRef); }
void EncodeAssemblyRefTable(AssemblyRefTable table) { int index = 0; foreach (AssemblyRefRow row in table.Rows) { this.asm.ALIGN(Assembly.OBJECT_ALIGNMENT); this.asm.LABEL(moduleName + " AssemblyRefRow#" + index); this.asm.AddObjectFields(typeof(SharpOS.AOT.Metadata.AssemblyRefRow).ToString()); this.asm.DATA(row.MajorVersion); this.asm.DATA(row.MinorVersion); this.asm.DATA(row.BuildNumber); this.asm.DATA(row.RevisionNumber); this.asm.DATA((uint)row.Flags); this.asm.DATA(row.PublicKeyOrToken); this.asm.DATA(row.Name); this.asm.DATA(row.Culture); this.asm.DATA(row.HashValue); ++index; } this.MetadataArray("AssemblyRef", table); }
public override void VisitAssemblyNameReferenceCollection(AssemblyNameReferenceCollection names) { if (!m_tHeap.HasTable(AssemblyRefTable.RId)) { return; } AssemblyRefTable arTable = m_tableReader.GetAssemblyRefTable(); for (int i = 0; i < arTable.Rows.Count; i++) { AssemblyRefRow arRow = arTable [i]; AssemblyNameReference aname = new AssemblyNameReference( ReadString(arRow.Name), ReadString(arRow.Culture), new Version(arRow.MajorVersion, arRow.MinorVersion, arRow.BuildNumber, arRow.RevisionNumber)); aname.PublicKeyToken = ReadBlob(arRow.PublicKeyOrToken); aname.Hash = ReadBlob(arRow.HashValue); aname.Flags = arRow.Flags; aname.MetadataToken = new MetadataToken(TokenType.AssemblyRef, (uint)i + 1); names.Add(aname); } }
private Assembly ResolveAssemblyRefImpl(ref AssemblyRefTable.Record rec) { const int PublicKey = 0x0001; string name = String.Format("{0}, Version={1}.{2}.{3}.{4}, Culture={5}, {6}={7}", GetString(rec.Name), rec.MajorVersion, rec.MinorVersion, rec.BuildNumber, rec.RevisionNumber, rec.Culture == 0 ? "neutral" : GetString(rec.Culture), (rec.Flags & PublicKey) == 0 ? "PublicKeyToken" : "PublicKey", PublicKeyOrTokenToString(rec.PublicKeyOrToken)); return universe.Load(name, this, true); }
public virtual void VisitAssemblyRefTable(AssemblyRefTable table) { }
public void Read(ReaderContext ctxt) { var reader = ctxt.GetTablesReader(); var actualReserved0 = reader.ReadUInt32(); if (actualReserved0 != reserved0) throw new PEException("invalid MetadataTable header"); var actualMajorVersion = reader.ReadByte(); if (actualMajorVersion != majorVersion) throw new PEException("invalid MetadataTable header"); var actualMinorVersion = reader.ReadByte(); if (actualMinorVersion != minorVersion) throw new PEException("invalid MetadataTable header"); var heapSizes = reader.ReadByte(); IsStringStreamBig = (heapSizes & 0x01) != 0; IsGuidStreamBig = (heapSizes & 0x02) != 0; IsBlobStreamBig = (heapSizes & 0x04) != 0; Reserved1 = reader.ReadByte(); var valid = new IntSet64(reader.ReadUInt64()); var sorted = new IntSet64(reader.ReadUInt64()); for (var i = 0; i < 64; i++) { var numRows = 0; if (valid[i]) numRows = (int)reader.ReadUInt32(); switch ((TableTag)i) { case TableTag.Module: ModuleTable = new ModuleTable(numRows); break; case TableTag.Assembly: AssemblyTable = new AssemblyTable(numRows); break; case TableTag.AssemblyOS: AssemblyOSTable = new AssemblyOSTable(numRows); break; case TableTag.AssemblyProcessor: AssemblyProcessorTable = new AssemblyProcessorTable(numRows); break; case TableTag.AssemblyRef: AssemblyRefTable = new AssemblyRefTable(numRows); break; case TableTag.AssemblyRefOS: AssemblyRefOSTable = new AssemblyRefOSTable(numRows); break; case TableTag.AssemblyRefProcessor: AssemblyRefProcessorTable = new AssemblyRefProcessorTable(numRows); break; case TableTag.ClassLayout: ClassLayoutTable = new ClassLayoutTable(numRows); break; case TableTag.Constant: ConstantTable = new ConstantTable(numRows); break; case TableTag.CustomAttribute: CustomAttributeTable = new CustomAttributeTable(numRows); break; case TableTag.DeclSecurity: DeclSecurityTable = new DeclSecurityTable(numRows); break; case TableTag.EventMap: EventMapTable = new EventMapTable(numRows); break; case TableTag.Event: EventTable = new EventTable(numRows); break; case TableTag.ExportedType: ExportedTypeTable = new ExportedTypeTable(numRows); break; case TableTag.Field: FieldTable = new FieldTable(numRows); break; case TableTag.FieldLayout: FieldLayoutTable = new FieldLayoutTable(numRows); break; case TableTag.FieldMarshal: FieldMarshalTable = new FieldMarshalTable(numRows); break; case TableTag.FieldRVA: FieldRVATable = new FieldRVATable(numRows); break; case TableTag.File: FileTable = new FileTable(numRows); break; case TableTag.GenericParam: GenericParamTable = new GenericParamTable(numRows); break; case TableTag.GenericParamConstraint: GenericParamConstraintTable = new GenericParamConstraintTable(numRows); break; case TableTag.ImplMap: ImplMapTable = new ImplMapTable(numRows); break; case TableTag.InterfaceImpl: InterfaceImplTable = new InterfaceImplTable(numRows); break; case TableTag.ManifestResource: ManifestResourceTable = new ManifestResourceTable(numRows); break; case TableTag.MemberRef: MemberRefTable = new MemberRefTable(numRows); break; case TableTag.MethodDef: MethodDefTable = new MethodDefTable(numRows); break; case TableTag.MethodImpl: MethodImplTable = new MethodImplTable(numRows); break; case TableTag.MethodSemantics: MethodSemanticsTable = new MethodSemanticsTable(numRows); break; case TableTag.MethodSpec: MethodSpecTable = new MethodSpecTable(numRows); break; case TableTag.ModuleRef: ModuleRefTable = new ModuleRefTable(numRows); break; case TableTag.NestedClass: NestedClassTable = new NestedClassTable(numRows); break; case TableTag.Param: ParamTable = new ParamTable(numRows); break; case TableTag.Property: PropertyTable = new PropertyTable(numRows); break; case TableTag.PropertyMap: PropertyMapTable = new PropertyMapTable(numRows); break; case TableTag.StandAloneSig: StandAloneSigTable = new StandAloneSigTable(numRows); break; case TableTag.TypeDef: TypeDefTable = new TypeDefTable(numRows); break; case TableTag.TypeRef: TypeRefTable = new TypeRefTable(numRows); break; case TableTag.TypeSpec: TypeSpecTable = new TypeSpecTable(numRows); break; default: // Ignore break; } } DetermineIndexCodingSizes(); for (var i = 0; i < 64; i++) { if (valid[i]) { switch ((TableTag)i) { case TableTag.Module: ModuleTable.Read(ctxt, reader); break; case TableTag.Assembly: AssemblyTable.Read(ctxt, reader); break; case TableTag.AssemblyOS: AssemblyOSTable.Read(ctxt, reader); break; case TableTag.AssemblyProcessor: AssemblyProcessorTable.Read(ctxt, reader); break; case TableTag.AssemblyRef: AssemblyRefTable.Read(ctxt, reader); break; case TableTag.AssemblyRefOS: AssemblyRefOSTable.Read(ctxt, reader); break; case TableTag.AssemblyRefProcessor: AssemblyRefProcessorTable.Read(ctxt, reader); break; case TableTag.ClassLayout: ClassLayoutTable.Read(ctxt, reader); break; case TableTag.Constant: ConstantTable.Read(ctxt, reader); break; case TableTag.CustomAttribute: CustomAttributeTable.Read(ctxt, reader); break; case TableTag.DeclSecurity: DeclSecurityTable.Read(ctxt, reader); break; case TableTag.EventMap: EventMapTable.Read(ctxt, reader); break; case TableTag.Event: EventTable.Read(ctxt, reader); break; case TableTag.ExportedType: ExportedTypeTable.Read(ctxt, reader); break; case TableTag.Field: FieldTable.Read(ctxt, reader); break; case TableTag.FieldLayout: FieldLayoutTable.Read(ctxt, reader); break; case TableTag.FieldMarshal: FieldMarshalTable.Read(ctxt, reader); break; case TableTag.FieldRVA: FieldRVATable.Read(ctxt, reader); break; case TableTag.File: FileTable.Read(ctxt, reader); break; case TableTag.GenericParam: GenericParamTable.Read(ctxt, reader); break; case TableTag.GenericParamConstraint: GenericParamConstraintTable.Read(ctxt, reader); break; case TableTag.ImplMap: ImplMapTable.Read(ctxt, reader); break; case TableTag.InterfaceImpl: InterfaceImplTable.Read(ctxt, reader); break; case TableTag.ManifestResource: ManifestResourceTable.Read(ctxt, reader); break; case TableTag.MemberRef: MemberRefTable.Read(ctxt, reader); break; case TableTag.MethodDef: MethodDefTable.Read(ctxt, reader); break; case TableTag.MethodImpl: MethodImplTable.Read(ctxt, reader); break; case TableTag.MethodSemantics: MethodSemanticsTable.Read(ctxt, reader); break; case TableTag.MethodSpec: MethodSpecTable.Read(ctxt, reader); break; case TableTag.ModuleRef: ModuleRefTable.Read(ctxt, reader); break; case TableTag.NestedClass: NestedClassTable.Read(ctxt, reader); break; case TableTag.Param: ParamTable.Read(ctxt, reader); break; case TableTag.Property: PropertyTable.Read(ctxt, reader); break; case TableTag.PropertyMap: PropertyMapTable.Read(ctxt, reader); break; case TableTag.StandAloneSig: StandAloneSigTable.Read(ctxt, reader); break; case TableTag.TypeDef: TypeDefTable.Read(ctxt, reader); break; case TableTag.TypeRef: TypeRefTable.Read(ctxt, reader); break; case TableTag.TypeSpec: TypeSpecTable.Read(ctxt, reader); break; default: throw new PEException("unexpected table tag in MetadataTable body"); } } } ModuleTable.ResolveIndexes(ctxt); TypeRefTable.ResolveIndexes(ctxt); TypeDefTable.ResolveIndexes(ctxt); FieldTable.ResolveIndexes(ctxt); MethodDefTable.ResolveIndexes(ctxt); ParamTable.ResolveIndexes(ctxt); InterfaceImplTable.ResolveIndexes(ctxt); MemberRefTable.ResolveIndexes(ctxt); ConstantTable.ResolveIndexes(ctxt); CustomAttributeTable.ResolveIndexes(ctxt); FieldMarshalTable.ResolveIndexes(ctxt); DeclSecurityTable.ResolveIndexes(ctxt); ClassLayoutTable.ResolveIndexes(ctxt); FieldLayoutTable.ResolveIndexes(ctxt); StandAloneSigTable.ResolveIndexes(ctxt); EventMapTable.ResolveIndexes(ctxt); EventTable.ResolveIndexes(ctxt); PropertyMapTable.ResolveIndexes(ctxt); PropertyTable.ResolveIndexes(ctxt); MethodSemanticsTable.ResolveIndexes(ctxt); MethodImplTable.ResolveIndexes(ctxt); ModuleRefTable.ResolveIndexes(ctxt); TypeSpecTable.ResolveIndexes(ctxt); ImplMapTable.ResolveIndexes(ctxt); FieldRVATable.ResolveIndexes(ctxt); AssemblyTable.ResolveIndexes(ctxt); AssemblyProcessorTable.ResolveIndexes(ctxt); AssemblyOSTable.ResolveIndexes(ctxt); AssemblyRefTable.ResolveIndexes(ctxt); AssemblyRefProcessorTable.ResolveIndexes(ctxt); AssemblyRefOSTable.ResolveIndexes(ctxt); FileTable.ResolveIndexes(ctxt); ExportedTypeTable.ResolveIndexes(ctxt); ManifestResourceTable.ResolveIndexes(ctxt); NestedClassTable.ResolveIndexes(ctxt); GenericParamTable.ResolveIndexes(ctxt); MethodSpecTable.ResolveIndexes(ctxt); GenericParamConstraintTable.ResolveIndexes(ctxt); }
public virtual void VisitAssemblyRefTable(AssemblyRefTable table) { }
public void Read(ReaderContext ctxt) { var reader = ctxt.GetTablesReader(); var actualReserved0 = reader.ReadUInt32(); if (actualReserved0 != reserved0) { throw new PEException("invalid MetadataTable header"); } var actualMajorVersion = reader.ReadByte(); if (actualMajorVersion != majorVersion) { throw new PEException("invalid MetadataTable header"); } var actualMinorVersion = reader.ReadByte(); if (actualMinorVersion != minorVersion) { throw new PEException("invalid MetadataTable header"); } var heapSizes = reader.ReadByte(); IsStringStreamBig = (heapSizes & 0x01) != 0; IsGuidStreamBig = (heapSizes & 0x02) != 0; IsBlobStreamBig = (heapSizes & 0x04) != 0; Reserved1 = reader.ReadByte(); var valid = new IntSet64(reader.ReadUInt64()); var sorted = new IntSet64(reader.ReadUInt64()); for (var i = 0; i < 64; i++) { var numRows = 0; if (valid[i]) { numRows = (int)reader.ReadUInt32(); } switch ((TableTag)i) { case TableTag.Module: ModuleTable = new ModuleTable(numRows); break; case TableTag.Assembly: AssemblyTable = new AssemblyTable(numRows); break; case TableTag.AssemblyOS: AssemblyOSTable = new AssemblyOSTable(numRows); break; case TableTag.AssemblyProcessor: AssemblyProcessorTable = new AssemblyProcessorTable(numRows); break; case TableTag.AssemblyRef: AssemblyRefTable = new AssemblyRefTable(numRows); break; case TableTag.AssemblyRefOS: AssemblyRefOSTable = new AssemblyRefOSTable(numRows); break; case TableTag.AssemblyRefProcessor: AssemblyRefProcessorTable = new AssemblyRefProcessorTable(numRows); break; case TableTag.ClassLayout: ClassLayoutTable = new ClassLayoutTable(numRows); break; case TableTag.Constant: ConstantTable = new ConstantTable(numRows); break; case TableTag.CustomAttribute: CustomAttributeTable = new CustomAttributeTable(numRows); break; case TableTag.DeclSecurity: DeclSecurityTable = new DeclSecurityTable(numRows); break; case TableTag.EventMap: EventMapTable = new EventMapTable(numRows); break; case TableTag.Event: EventTable = new EventTable(numRows); break; case TableTag.ExportedType: ExportedTypeTable = new ExportedTypeTable(numRows); break; case TableTag.Field: FieldTable = new FieldTable(numRows); break; case TableTag.FieldLayout: FieldLayoutTable = new FieldLayoutTable(numRows); break; case TableTag.FieldMarshal: FieldMarshalTable = new FieldMarshalTable(numRows); break; case TableTag.FieldRVA: FieldRVATable = new FieldRVATable(numRows); break; case TableTag.File: FileTable = new FileTable(numRows); break; case TableTag.GenericParam: GenericParamTable = new GenericParamTable(numRows); break; case TableTag.GenericParamConstraint: GenericParamConstraintTable = new GenericParamConstraintTable(numRows); break; case TableTag.ImplMap: ImplMapTable = new ImplMapTable(numRows); break; case TableTag.InterfaceImpl: InterfaceImplTable = new InterfaceImplTable(numRows); break; case TableTag.ManifestResource: ManifestResourceTable = new ManifestResourceTable(numRows); break; case TableTag.MemberRef: MemberRefTable = new MemberRefTable(numRows); break; case TableTag.MethodDef: MethodDefTable = new MethodDefTable(numRows); break; case TableTag.MethodImpl: MethodImplTable = new MethodImplTable(numRows); break; case TableTag.MethodSemantics: MethodSemanticsTable = new MethodSemanticsTable(numRows); break; case TableTag.MethodSpec: MethodSpecTable = new MethodSpecTable(numRows); break; case TableTag.ModuleRef: ModuleRefTable = new ModuleRefTable(numRows); break; case TableTag.NestedClass: NestedClassTable = new NestedClassTable(numRows); break; case TableTag.Param: ParamTable = new ParamTable(numRows); break; case TableTag.Property: PropertyTable = new PropertyTable(numRows); break; case TableTag.PropertyMap: PropertyMapTable = new PropertyMapTable(numRows); break; case TableTag.StandAloneSig: StandAloneSigTable = new StandAloneSigTable(numRows); break; case TableTag.TypeDef: TypeDefTable = new TypeDefTable(numRows); break; case TableTag.TypeRef: TypeRefTable = new TypeRefTable(numRows); break; case TableTag.TypeSpec: TypeSpecTable = new TypeSpecTable(numRows); break; default: // Ignore break; } } DetermineIndexCodingSizes(); for (var i = 0; i < 64; i++) { if (valid[i]) { switch ((TableTag)i) { case TableTag.Module: ModuleTable.Read(ctxt, reader); break; case TableTag.Assembly: AssemblyTable.Read(ctxt, reader); break; case TableTag.AssemblyOS: AssemblyOSTable.Read(ctxt, reader); break; case TableTag.AssemblyProcessor: AssemblyProcessorTable.Read(ctxt, reader); break; case TableTag.AssemblyRef: AssemblyRefTable.Read(ctxt, reader); break; case TableTag.AssemblyRefOS: AssemblyRefOSTable.Read(ctxt, reader); break; case TableTag.AssemblyRefProcessor: AssemblyRefProcessorTable.Read(ctxt, reader); break; case TableTag.ClassLayout: ClassLayoutTable.Read(ctxt, reader); break; case TableTag.Constant: ConstantTable.Read(ctxt, reader); break; case TableTag.CustomAttribute: CustomAttributeTable.Read(ctxt, reader); break; case TableTag.DeclSecurity: DeclSecurityTable.Read(ctxt, reader); break; case TableTag.EventMap: EventMapTable.Read(ctxt, reader); break; case TableTag.Event: EventTable.Read(ctxt, reader); break; case TableTag.ExportedType: ExportedTypeTable.Read(ctxt, reader); break; case TableTag.Field: FieldTable.Read(ctxt, reader); break; case TableTag.FieldLayout: FieldLayoutTable.Read(ctxt, reader); break; case TableTag.FieldMarshal: FieldMarshalTable.Read(ctxt, reader); break; case TableTag.FieldRVA: FieldRVATable.Read(ctxt, reader); break; case TableTag.File: FileTable.Read(ctxt, reader); break; case TableTag.GenericParam: GenericParamTable.Read(ctxt, reader); break; case TableTag.GenericParamConstraint: GenericParamConstraintTable.Read(ctxt, reader); break; case TableTag.ImplMap: ImplMapTable.Read(ctxt, reader); break; case TableTag.InterfaceImpl: InterfaceImplTable.Read(ctxt, reader); break; case TableTag.ManifestResource: ManifestResourceTable.Read(ctxt, reader); break; case TableTag.MemberRef: MemberRefTable.Read(ctxt, reader); break; case TableTag.MethodDef: MethodDefTable.Read(ctxt, reader); break; case TableTag.MethodImpl: MethodImplTable.Read(ctxt, reader); break; case TableTag.MethodSemantics: MethodSemanticsTable.Read(ctxt, reader); break; case TableTag.MethodSpec: MethodSpecTable.Read(ctxt, reader); break; case TableTag.ModuleRef: ModuleRefTable.Read(ctxt, reader); break; case TableTag.NestedClass: NestedClassTable.Read(ctxt, reader); break; case TableTag.Param: ParamTable.Read(ctxt, reader); break; case TableTag.Property: PropertyTable.Read(ctxt, reader); break; case TableTag.PropertyMap: PropertyMapTable.Read(ctxt, reader); break; case TableTag.StandAloneSig: StandAloneSigTable.Read(ctxt, reader); break; case TableTag.TypeDef: TypeDefTable.Read(ctxt, reader); break; case TableTag.TypeRef: TypeRefTable.Read(ctxt, reader); break; case TableTag.TypeSpec: TypeSpecTable.Read(ctxt, reader); break; default: throw new PEException("unexpected table tag in MetadataTable body"); } } } ModuleTable.ResolveIndexes(ctxt); TypeRefTable.ResolveIndexes(ctxt); TypeDefTable.ResolveIndexes(ctxt); FieldTable.ResolveIndexes(ctxt); MethodDefTable.ResolveIndexes(ctxt); ParamTable.ResolveIndexes(ctxt); InterfaceImplTable.ResolveIndexes(ctxt); MemberRefTable.ResolveIndexes(ctxt); ConstantTable.ResolveIndexes(ctxt); CustomAttributeTable.ResolveIndexes(ctxt); FieldMarshalTable.ResolveIndexes(ctxt); DeclSecurityTable.ResolveIndexes(ctxt); ClassLayoutTable.ResolveIndexes(ctxt); FieldLayoutTable.ResolveIndexes(ctxt); StandAloneSigTable.ResolveIndexes(ctxt); EventMapTable.ResolveIndexes(ctxt); EventTable.ResolveIndexes(ctxt); PropertyMapTable.ResolveIndexes(ctxt); PropertyTable.ResolveIndexes(ctxt); MethodSemanticsTable.ResolveIndexes(ctxt); MethodImplTable.ResolveIndexes(ctxt); ModuleRefTable.ResolveIndexes(ctxt); TypeSpecTable.ResolveIndexes(ctxt); ImplMapTable.ResolveIndexes(ctxt); FieldRVATable.ResolveIndexes(ctxt); AssemblyTable.ResolveIndexes(ctxt); AssemblyProcessorTable.ResolveIndexes(ctxt); AssemblyOSTable.ResolveIndexes(ctxt); AssemblyRefTable.ResolveIndexes(ctxt); AssemblyRefProcessorTable.ResolveIndexes(ctxt); AssemblyRefOSTable.ResolveIndexes(ctxt); FileTable.ResolveIndexes(ctxt); ExportedTypeTable.ResolveIndexes(ctxt); ManifestResourceTable.ResolveIndexes(ctxt); NestedClassTable.ResolveIndexes(ctxt); GenericParamTable.ResolveIndexes(ctxt); MethodSpecTable.ResolveIndexes(ctxt); GenericParamConstraintTable.ResolveIndexes(ctxt); }
private Assembly ResolveAssemblyRefImpl(ref AssemblyRefTable.Record rec) { const int PublicKey = 0x0001; string name = AssemblyName.GetFullName( GetString(rec.Name), rec.MajorVersion, rec.MinorVersion, rec.BuildNumber, rec.RevisionNumber, rec.Culture == 0 ? "neutral" : GetString(rec.Culture), rec.PublicKeyOrToken == 0 ? Empty<byte>.Array : (rec.Flags & PublicKey) == 0 ? GetBlobCopy(rec.PublicKeyOrToken) : AssemblyName.ComputePublicKeyToken(GetBlobCopy(rec.PublicKeyOrToken)), rec.Flags); return universe.Load(name, this, true); }