Enum MetadataBuilderFlags
- Namespace
- AsmResolver.DotNet.Builder
- Assembly
- AsmResolver.DotNet.dll
Provides members for describing the behaviour of the .NET directory builder.
[Flags]
public enum MetadataBuilderFlags
Fields
ForceEncMetadata = 2097152Setting this flag will force the builder to emit edit-and-continue metadata, even if it is not required.
NoMemberSignatureVerification = 4194304By default, AsmResolver will validate member definitions that hold signatures for consistency with their associated metadata. This includes e.g., testing whether static methods have the HasThis unset in their signatures, and verifying that the number of generic parameters is consistent with what is defined in their signature.
Setting this flag will disable this verification.
NoResourceDataDeduplication = 1048576By default, when adding two embedded resources to a file with identical contents, AsmResolver will not add the second copy of the data to the output file and instead reuse the first blob. This can drastically reduce the size of the final output file.
While supported by the .NET runtime, some post-processors (e.g., obfuscators) may not work well with this or depend on individual resource items to be present. Setting this flag will disable this optimization.
NoStringsStreamOptimization = 524288By default, AsmResolver will optimize the #Strings stream for size. This means that strings that are a suffix of another will not be added twice to the buffer, but rather will be referenced using an offset within the longer string. This avoids lots of duplication in the final stream.
Setting this flag will disable this optimization.
None = 0Indicates no special metadata builder flags.
PreserveAll = PreserveBlobIndices | PreserveGuidIndices | PreserveStringIndices | PreserveUserStringIndices | PreserveTableIndices | PreserveUnknownStreams | PreserveStreamOrderIndicates any kind of index into a blob or tables stream, as well as unknown spurious metadata streams should be preserved whenever possible during the construction of the metadata directory.
PreserveAssemblyReferenceIndices = 32768Indicates indices into the assembly reference table should be preserved whenever possible during the construction of the metadata directory.
PreserveBlobIndices = 1Indicates indices into the #Blob stream should be preserved whenever possible during the construction of the metadata directory.
PreserveEventDefinitionIndices = 2048Indicates indices into the event definition table should be preserved whenever possible during the construction of the metadata directory.
PreserveFieldDefinitionIndices = 64Indicates indices into the field definition table should be preserved whenever possible during the construction of the metadata directory.
PreserveGuidIndices = 2Indicates indices into the #GUID stream should be preserved whenever possible during the construction of the metadata directory.
PreserveMemberReferenceIndices = 512Indicates indices into the member reference table should be preserved whenever possible during the construction of the metadata directory.
PreserveMethodDefinitionIndices = 128Indicates indices into the method definition table should be preserved whenever possible during the construction of the metadata directory.
PreserveMethodSpecificationIndices = 65536Indicates indices into the method specification table should be preserved whenever possible during the construction of the metadata directory.
PreserveModuleReferenceIndices = 8192Indicates indices into the module reference table should be preserved whenever possible during the construction of the metadata directory.
PreserveParameterDefinitionIndices = 256Indicates indices into the parameter definition table should be preserved whenever possible during the construction of the metadata directory.
PreservePropertyDefinitionIndices = 4096Indicates indices into the property definition table should be preserved whenever possible during the construction of the metadata directory.
PreserveStandAloneSignatureIndices = 1024Indicates indices into the stand-alone signature table should be preserved whenever possible during the construction of the metadata directory.
PreserveStreamOrder = 262144Indicates unconventional metadata stream order in the .NET metadata directory should be preserved when possible.
PreserveStringIndices = 4Indicates indices into the #Strings stream should be preserved whenever possible during the construction of the metadata directory.
PreserveTableIndices = PreserveTypeReferenceIndices | PreserveTypeDefinitionIndices | PreserveFieldDefinitionIndices | PreserveMethodDefinitionIndices | PreserveParameterDefinitionIndices | PreserveMemberReferenceIndices | PreserveStandAloneSignatureIndices | PreserveEventDefinitionIndices | PreservePropertyDefinitionIndices | PreserveModuleReferenceIndices | PreserveTypeSpecificationIndices | PreserveAssemblyReferenceIndices | PreserveMethodSpecificationIndicesIndicates indices into the tables stream should be preserved whenever possible during the construction of the metadata directory.
PreserveTypeDefinitionIndices = 32Indicates indices into the type definition table should be preserved whenever possible during the construction of the metadata directory.
PreserveTypeReferenceIndices = 16Indicates indices into the type references table should be preserved whenever possible during the construction of the metadata directory.
PreserveTypeSpecificationIndices = 16384Indicates indices into the type specification table should be preserved whenever possible during the construction of the metadata directory.
PreserveUnknownStreams = 131072Indicates unconventional / spurious metadata streams present in the .NET metadata directory should be preserved when possible.
PreserveUserStringIndices = 8Indicates indices into the #US stream should be preserved whenever possible during the construction of the metadata directory.