상속: AsmResolver.Builder.WindowsAssemblyBuilder
예제 #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);
        }
예제 #3
0
 public SectionsTableBuilder(NetAssemblyBuilder builder)
 {
     _builder = builder;
     Segments.Add(_headerBuilder);
     Segments.Add(_contentBuilder);
 }
예제 #4
0
 public SectionsTableBuilder(NetAssemblyBuilder builder)
 {
     _builder = builder;
     Segments.Add(_headerBuilder);
     Segments.Add(_contentBuilder);
 }
예제 #5
0
 public NetBuildingContext(NetAssemblyBuilder builder)
     : base(builder)
 {
 }
예제 #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));
 }