public MetadataReader(MetadataHeaps heaps, MetadataToken entryPoint) { _heaps = heaps; _entryPoint = entryPoint; _resolveBlob = Func.Memoize <uint, ByteBuffer>(_heaps.Blobs.ReadBlob); _resolveGuid = Func.Memoize <uint, Guid>(_heaps.Guids.ReadGuid); _resolveString = Func.Memoize <uint, string>(_heaps.Strings.ReadString); _resolveUserString = Func.Memoize <uint, string>(_heaps.UserStrings.ReadString); }
private MetadataBuilder(AssemblyDefinition assemblyDef) { _assemblyDef = assemblyDef; _heaps = new MetadataHeaps(); _ilCode = new ILCodeWriter(this); _writeBlob = Func.Memoize <ByteBuffer, uint>(_heaps.Blobs.WriteBlob); _writeGuid = Func.Memoize <Guid, uint>(_heaps.Guids.WriteGuid); _writeString = Func.Memoize <string, uint>(_heaps.Strings.WriteString, StringComparer.Ordinal); _writeUserString = Func.Memoize <string, uint>(_heaps.UserStrings.WriteString, StringComparer.Ordinal); _resolveToken = Func.Memoize <IMetadataEntity, MetadataToken>(entity => MetadataTokenResolver.ResolveToken(entity, this)); }
public MetadataBuildResult(MetadataToken entryPointToken, MetadataHeaps heaps, ILCodeWriter ilCode) { EntryPointToken = entryPointToken; Heaps = heaps; ILCode = ilCode; }