Inheritance: AsmResolver.Builder.FileSegmentBuilder
Esempio n. 1
0
        public NetTextBuilder(ImageNetDirectory directory)
        {
            _directory = directory;

            ImportBuilder = new ImageImportDirectoryBuilder(directory.Assembly, directory.Assembly.ImportDirectory);

            Segments.Add(ImportBuilder.AddressTablesBuilder);
            Segments.Add(directory);
            Segments.Add(MethodBodyTableBuilder      = new MethodBodyTableBuilder());
            Segments.Add(NetResourceDirectoryBuilder = new NetResourceDirectoryBuilder());
            Segments.Add(DataBuilder = new NetDataTableBuilder());

            if (directory.StrongNameData != null)
            {
                Segments.Add(directory.StrongNameData);
            }

            Segments.Add(Metadata = new MetadataBuilder(directory.MetadataHeader));

            if (directory.Assembly.DebugDirectory != null)
            {
                Segments.Add(directory.Assembly.DebugDirectory);
                Segments.Add(directory.Assembly.DebugDirectory.Data);
            }

            Segments.Add(ImportBuilder);
            Segments.Add(StartupCode = new StartupCodeSegmentBuilder());
        }
Esempio n. 2
0
        public NetTextBuilder(ImageNetDirectory directory)
        {
            _directory = directory;

            ImportBuilder = new ImageImportDirectoryBuilder(directory.Assembly, directory.Assembly.ImportDirectory);

            Segments.Add(ImportBuilder.AddressTablesBuilder);
            Segments.Add(directory);
            Segments.Add(MethodBodyTableBuilder = new MethodBodyTableBuilder());
            Segments.Add(NetResourceDirectoryBuilder = new NetResourceDirectoryBuilder());
            Segments.Add(DataBuilder = new NetDataTableBuilder());

            if (directory.StrongNameData != null)
                Segments.Add(directory.StrongNameData);

            Segments.Add(Metadata = new MetadataBuilder(directory.MetadataHeader));

            if (directory.Assembly.DebugDirectory != null)
            {
                Segments.Add(directory.Assembly.DebugDirectory);
                Segments.Add(directory.Assembly.DebugDirectory.Data);
            }

            Segments.Add(ImportBuilder);
            Segments.Add(StartupCode = new StartupCodeSegmentBuilder());
        }