Edit

Share via


MetadataRootBuilder(MetadataBuilder, String, Boolean) Constructor

Definition

Creates a builder of a metadata root.

public MetadataRootBuilder (System.Reflection.Metadata.Ecma335.MetadataBuilder tablesAndHeaps, string? metadataVersion = default, bool suppressValidation = false);
public MetadataRootBuilder (System.Reflection.Metadata.Ecma335.MetadataBuilder tablesAndHeaps, string metadataVersion = default, bool suppressValidation = false);
new System.Reflection.Metadata.Ecma335.MetadataRootBuilder : System.Reflection.Metadata.Ecma335.MetadataBuilder * string * bool -> System.Reflection.Metadata.Ecma335.MetadataRootBuilder
Public Sub New (tablesAndHeaps As MetadataBuilder, Optional metadataVersion As String = Nothing, Optional suppressValidation As Boolean = false)

Parameters

tablesAndHeaps
MetadataBuilder

Builder populated with metadata entities stored in tables and values stored in heaps. The entities and values will be enumerated when serializing the metadata root.

metadataVersion
String

The version string written to the metadata header. The default value is "v4.0.30319".

suppressValidation
Boolean

true to suppress basic validation of metadata tables during serialization; otherwise, false.

Exceptions

tablesAndHeaps is null.

metadataVersion is too long (the number of bytes when UTF8-encoded must be less than 255).

Remarks

When suppressValidation is set to true, the validation verifies that entries in the tables were added in order required by the ECMA specification. It does not enforce all specification requirements on metadata tables.

Applies to