<PackageReference Include="Microsoft.Packaging.Tools" Version="1.0.0-preview2-25401-01" />

System.Reflection.PortableExecutable.PEBuilder

abstract class PEBuilder
namespace System.Reflection.PortableExecutable { internal abstract class PEBuilder { protected struct Section { public readonly string Name; public readonly SectionCharacteristics Characteristics; public Section(string name, SectionCharacteristics characteristics); } public PEHeaderBuilder Header { get; } public Func<IEnumerable<Blob>, BlobContentId> IdProvider { get; } public bool IsDeterministic { get; } protected PEBuilder(PEHeaderBuilder header, Func<IEnumerable<Blob>, BlobContentId> deterministicIdProvider); protected ImmutableArray<Section> GetSections(); protected abstract ImmutableArray<Section> CreateSections(); protected abstract BlobBuilder SerializeSection(string name, SectionLocation location); public void Serialize(BlobBuilder builder, out BlobContentId contentId); } }