/// <summary> /// Creates a new .NET data directory buffer. /// </summary> /// <param name="module">The module for which this .NET directory is built.</param> /// <param name="methodBodySerializer">The method body serializer to use for constructing method bodies.</param> /// <param name="metadata">The metadata builder </param> public DotNetDirectoryBuffer(ModuleDefinition module, IMethodBodySerializer methodBodySerializer, IMetadataBuffer metadata) { Module = module; MethodBodySerializer = methodBodySerializer; Metadata = metadata; Resources = new DotNetResourcesDirectoryBuffer(); }
/// <summary> /// Creates a new .NET data directory buffer. /// </summary> /// <param name="module">The module for which this .NET directory is built.</param> /// <param name="methodBodySerializer">The method body serializer to use for constructing method bodies.</param> /// <param name="metadata">The metadata builder </param> /// <param name="diagnosticBag">The bag that collects all diagnostic information during the building process.</param> public DotNetDirectoryBuffer( ModuleDefinition module, IMethodBodySerializer methodBodySerializer, IMetadataBuffer metadata, DiagnosticBag diagnosticBag) { Module = module ?? throw new ArgumentNullException(nameof(module)); MethodBodySerializer = methodBodySerializer ?? throw new ArgumentNullException(nameof(methodBodySerializer)); Metadata = metadata ?? throw new ArgumentNullException(nameof(metadata)); DiagnosticBag = diagnosticBag ?? throw new ArgumentNullException(nameof(diagnosticBag)); Resources = new DotNetResourcesDirectoryBuffer(); }