Inheritance: AsmResolver.Builder.WindowsAssemblyBuilder
Esempio n. 1
0
 public SectionBuilder(NetAssemblyBuilder builder, string name)
 {
     _builder = builder;
     Header = new ImageSectionHeader()
     {
         Name = name
     };
 }
        public ResourceDirectoryBuilder(NetAssemblyBuilder builder, IOffsetConverter offsetConverter, ImageResourceDirectory rootDirectory)
        {
            if (builder == null)
                throw new ArgumentNullException("builder");
            if (offsetConverter == null)
                throw new ArgumentNullException("offsetConverter");
            if (rootDirectory == null)
                throw new ArgumentNullException("rootDirectory");

            _offsetConverter = offsetConverter;
            _rootDirectory = rootDirectory;

            _resourceDirectory = builder.Assembly.NtHeaders.OptionalHeader.DataDirectories[ImageDataDirectory.ResourceDirectoryIndex];

            Segments.Add(_directoryTablesBuilder = new DirectoryTablesBuilder(_resourceDirectory, offsetConverter));
            Segments.Add(_dataDirectoryTableBuilder = new DataDirectoryTablesBuilder(_dataTableBuilder, offsetConverter));
            Segments.Add(_dataTableBuilder);
        }
Esempio n. 3
0
 public SectionsTableBuilder(NetAssemblyBuilder builder)
 {
     _builder = builder;
     Segments.Add(_headerBuilder);
     Segments.Add(_contentBuilder);
 }
Esempio n. 4
0
 public SectionsTableBuilder(NetAssemblyBuilder builder)
 {
     _builder = builder;
     Segments.Add(_headerBuilder);
     Segments.Add(_contentBuilder);
 }
Esempio n. 5
0
 public NetBuildingContext(NetAssemblyBuilder builder)
     : base(builder)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Rebuilds and writes the assembly to a destination, using the specified building parameters.
 /// </summary>
 /// <param name="parameters">The parameters to use for building the assembly image.</param>
 public void Write(BuildingParameters parameters)
 {
     var builder = new NetAssemblyBuilder(this, parameters);
     var context = new NetBuildingContext(builder);
     builder.Build(context);
     builder.UpdateOffsets(context);
     builder.UpdateReferences(context);
     builder.Write(new WritingContext(this, parameters.Writer, context));
 }