Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Reflection.Metadata.Ecma335.MetadataBuilder Class Referencesealed

Classes

struct  AssemblyRefTableRow
 
struct  AssemblyRow
 
struct  ClassLayoutRow
 
struct  ConstantRow
 
struct  CustomAttributeRow
 
struct  CustomDebugInformationRow
 
struct  DeclSecurityRow
 
struct  DocumentRow
 
struct  EncLogRow
 
struct  EncMapRow
 
struct  EventMapRow
 
struct  EventRow
 
struct  ExportedTypeRow
 
struct  FieldDefRow
 
struct  FieldLayoutRow
 
struct  FieldMarshalRow
 
struct  FieldRvaRow
 
struct  FileTableRow
 
struct  GenericParamConstraintRow
 
struct  GenericParamRow
 
class  HeapBlobBuilder
 
struct  ImplMapRow
 
struct  ImportScopeRow
 
struct  InterfaceImplRow
 
struct  LocalConstantRow
 
struct  LocalScopeRow
 
struct  LocalVariableRow
 
struct  ManifestResourceRow
 
struct  MemberRefRow
 
struct  MethodDebugInformationRow
 
struct  MethodImplRow
 
struct  MethodRow
 
struct  MethodSemanticsRow
 
struct  MethodSpecRow
 
struct  ModuleRefRow
 
struct  ModuleRow
 
struct  NestedClassRow
 
struct  ParamRow
 
struct  PropertyMapRow
 
struct  PropertyRow
 
struct  StandaloneSigRow
 
struct  StateMachineMethodRow
 
class  SuffixSort
 
struct  TypeDefRow
 
struct  TypeRefRow
 
struct  TypeSpecRow
 

Public Member Functions

void SetCapacity (TableIndex table, int rowCount)
 
int GetRowCount (TableIndex table)
 
ImmutableArray< int > GetRowCounts ()
 
ModuleDefinitionHandle AddModule (int generation, StringHandle moduleName, GuidHandle mvid, GuidHandle encId, GuidHandle encBaseId)
 
AssemblyDefinitionHandle AddAssembly (StringHandle name, Version version, StringHandle culture, BlobHandle publicKey, AssemblyFlags flags, AssemblyHashAlgorithm hashAlgorithm)
 
AssemblyReferenceHandle AddAssemblyReference (StringHandle name, Version version, StringHandle culture, BlobHandle publicKeyOrToken, AssemblyFlags flags, BlobHandle hashValue)
 
TypeDefinitionHandle AddTypeDefinition (TypeAttributes attributes, StringHandle @namespace, StringHandle name, EntityHandle baseType, FieldDefinitionHandle fieldList, MethodDefinitionHandle methodList)
 
void AddTypeLayout (TypeDefinitionHandle type, ushort packingSize, uint size)
 
InterfaceImplementationHandle AddInterfaceImplementation (TypeDefinitionHandle type, EntityHandle implementedInterface)
 
void AddNestedType (TypeDefinitionHandle type, TypeDefinitionHandle enclosingType)
 
TypeReferenceHandle AddTypeReference (EntityHandle resolutionScope, StringHandle @namespace, StringHandle name)
 
TypeSpecificationHandle AddTypeSpecification (BlobHandle signature)
 
StandaloneSignatureHandle AddStandaloneSignature (BlobHandle signature)
 
PropertyDefinitionHandle AddProperty (PropertyAttributes attributes, StringHandle name, BlobHandle signature)
 
void AddPropertyMap (TypeDefinitionHandle declaringType, PropertyDefinitionHandle propertyList)
 
EventDefinitionHandle AddEvent (EventAttributes attributes, StringHandle name, EntityHandle type)
 
void AddEventMap (TypeDefinitionHandle declaringType, EventDefinitionHandle eventList)
 
ConstantHandle AddConstant (EntityHandle parent, object? value)
 
void AddMethodSemantics (EntityHandle association, MethodSemanticsAttributes semantics, MethodDefinitionHandle methodDefinition)
 
CustomAttributeHandle AddCustomAttribute (EntityHandle parent, EntityHandle constructor, BlobHandle value)
 
MethodSpecificationHandle AddMethodSpecification (EntityHandle method, BlobHandle instantiation)
 
ModuleReferenceHandle AddModuleReference (StringHandle moduleName)
 
ParameterHandle AddParameter (ParameterAttributes attributes, StringHandle name, int sequenceNumber)
 
GenericParameterHandle AddGenericParameter (EntityHandle parent, GenericParameterAttributes attributes, StringHandle name, int index)
 
GenericParameterConstraintHandle AddGenericParameterConstraint (GenericParameterHandle genericParameter, EntityHandle constraint)
 
FieldDefinitionHandle AddFieldDefinition (FieldAttributes attributes, StringHandle name, BlobHandle signature)
 
void AddFieldLayout (FieldDefinitionHandle field, int offset)
 
void AddMarshallingDescriptor (EntityHandle parent, BlobHandle descriptor)
 
void AddFieldRelativeVirtualAddress (FieldDefinitionHandle field, int offset)
 
MethodDefinitionHandle AddMethodDefinition (MethodAttributes attributes, MethodImplAttributes implAttributes, StringHandle name, BlobHandle signature, int bodyOffset, ParameterHandle parameterList)
 
void AddMethodImport (MethodDefinitionHandle method, MethodImportAttributes attributes, StringHandle name, ModuleReferenceHandle module)
 
MethodImplementationHandle AddMethodImplementation (TypeDefinitionHandle type, EntityHandle methodBody, EntityHandle methodDeclaration)
 
MemberReferenceHandle AddMemberReference (EntityHandle parent, StringHandle name, BlobHandle signature)
 
ManifestResourceHandle AddManifestResource (ManifestResourceAttributes attributes, StringHandle name, EntityHandle implementation, uint offset)
 
AssemblyFileHandle AddAssemblyFile (StringHandle name, BlobHandle hashValue, bool containsMetadata)
 
ExportedTypeHandle AddExportedType (TypeAttributes attributes, StringHandle @namespace, StringHandle name, EntityHandle implementation, int typeDefinitionId)
 
DeclarativeSecurityAttributeHandle AddDeclarativeSecurityAttribute (EntityHandle parent, DeclarativeSecurityAction action, BlobHandle permissionSet)
 
void AddEncLogEntry (EntityHandle entity, EditAndContinueOperation code)
 
void AddEncMapEntry (EntityHandle entity)
 
DocumentHandle AddDocument (BlobHandle name, GuidHandle hashAlgorithm, BlobHandle hash, GuidHandle language)
 
MethodDebugInformationHandle AddMethodDebugInformation (DocumentHandle document, BlobHandle sequencePoints)
 
LocalScopeHandle AddLocalScope (MethodDefinitionHandle method, ImportScopeHandle importScope, LocalVariableHandle variableList, LocalConstantHandle constantList, int startOffset, int length)
 
LocalVariableHandle AddLocalVariable (LocalVariableAttributes attributes, int index, StringHandle name)
 
LocalConstantHandle AddLocalConstant (StringHandle name, BlobHandle signature)
 
ImportScopeHandle AddImportScope (ImportScopeHandle parentScope, BlobHandle imports)
 
void AddStateMachineMethod (MethodDefinitionHandle moveNextMethod, MethodDefinitionHandle kickoffMethod)
 
CustomDebugInformationHandle AddCustomDebugInformation (EntityHandle parent, GuidHandle kind, BlobHandle value)
 
 MetadataBuilder (int userStringHeapStartOffset=0, int stringHeapStartOffset=0, int blobHeapStartOffset=0, int guidHeapStartOffset=0)
 
void SetCapacity (HeapIndex heap, int byteCount)
 
BlobHandle GetOrAddBlob (BlobBuilder value)
 
BlobHandle GetOrAddBlob (byte[] value)
 
BlobHandle GetOrAddBlob (ImmutableArray< byte > value)
 
BlobHandle GetOrAddConstantBlob (object? value)
 
BlobHandle GetOrAddBlobUTF16 (string value)
 
BlobHandle GetOrAddBlobUTF8 (string value, bool allowUnpairedSurrogates=true)
 
BlobHandle GetOrAddDocumentName (string value)
 
GuidHandle GetOrAddGuid (Guid guid)
 
ReservedBlob< GuidHandleReserveGuid ()
 
StringHandle GetOrAddString (string value)
 
ReservedBlob< UserStringHandleReserveUserString (int length)
 
UserStringHandle GetOrAddUserString (string value)
 

Package Functions

SerializedMetadata GetSerializedMetadata (ImmutableArray< int > externalRowCounts, int metadataVersionByteCount, bool isStandaloneDebugMetadata)
 
void ValidateOrder ()
 
void SerializeMetadataTables (BlobBuilder writer, MetadataSizes metadataSizes, ImmutableArray< int > stringMap, int methodBodyStreamRva, int mappedFieldDataStreamRva)
 
void SerializeModuleTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
int SerializeHandle (ImmutableArray< int > map, StringHandle handle)
 
int SerializeHandle (BlobHandle handle)
 
int SerializeHandle (GuidHandle handle)
 
int SerializeHandle (UserStringHandle handle)
 
void WriteHeapsTo (BlobBuilder builder, BlobBuilder stringHeap)
 

Static Package Functions

static void SerializeMetadataHeader (BlobBuilder builder, string metadataVersion, MetadataSizes sizes)
 

Private Member Functions

void ValidateClassLayoutTable ()
 
void ValidateFieldLayoutTable ()
 
void ValidateFieldRvaTable ()
 
void ValidateGenericParamTable ()
 
void ValidateGenericParamConstaintTable ()
 
void ValidateImplMapTable ()
 
void ValidateInterfaceImplTable ()
 
void ValidateMethodImplTable ()
 
void ValidateNestedClassTable ()
 
void ValidateLocalScopeTable ()
 
void ValidateStateMachineMethodTable ()
 
void SerializeTablesHeader (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeEncLogTable (BlobBuilder writer)
 
void SerializeEncMapTable (BlobBuilder writer)
 
void SerializeTypeRefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeTypeDefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeFieldTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeMethodDefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes, int methodBodyStreamRva)
 
void SerializeParamTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeInterfaceImplTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeMemberRefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeConstantTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeCustomAttributeTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeFieldMarshalTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeDeclSecurityTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeClassLayoutTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeFieldLayoutTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeStandAloneSigTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeEventMapTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeEventTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializePropertyMapTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializePropertyTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeMethodSemanticsTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeMethodImplTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeModuleRefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeTypeSpecTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeImplMapTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeFieldRvaTable (BlobBuilder writer, MetadataSizes metadataSizes, int mappedFieldDataStreamRva)
 
void SerializeAssemblyTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeAssemblyRefTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeFileTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeExportedTypeTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeManifestResourceTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeNestedClassTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeGenericParamTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeGenericParamConstraintTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeMethodSpecTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeDocumentTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeMethodDebugInformationTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeLocalScopeTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeLocalVariableTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeLocalConstantTable (BlobBuilder writer, ImmutableArray< int > stringMap, MetadataSizes metadataSizes)
 
void SerializeImportScopeTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeStateMachineMethodTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
void SerializeCustomDebugInformationTable (BlobBuilder writer, MetadataSizes metadataSizes)
 
GuidHandle GetNewGuidHandle ()
 
UserStringHandle GetNewUserStringHandle ()
 
void WriteAlignedBlobHeap (BlobBuilder builder)
 

Static Private Member Functions

static void SerializeStreamHeader (ref int offsetFromStartOfMetadata, int alignedStreamSize, string streamName, BlobBuilder builder)
 
static void SetTableCapacity< T > (List< T > table, int rowCount)
 
static char ChooseSeparator (string str)
 
static ImmutableArray< int > SerializeStringHeap (BlobBuilder heapBuilder, Dictionary< string, StringHandle > strings, int stringHeapStartOffset)
 
static void WriteAligned (BlobBuilder source, BlobBuilder target)
 

Private Attributes

ModuleRow_moduleRow
 
AssemblyRow_assemblyRow
 
readonly List< ClassLayoutRow_classLayoutTable = new List<ClassLayoutRow>()
 
readonly List< ConstantRow_constantTable = new List<ConstantRow>()
 
int _constantTableLastParent
 
bool _constantTableNeedsSorting
 
readonly List< CustomAttributeRow_customAttributeTable = new List<CustomAttributeRow>()
 
int _customAttributeTableLastParent
 
bool _customAttributeTableNeedsSorting
 
readonly List< DeclSecurityRow_declSecurityTable = new List<DeclSecurityRow>()
 
int _declSecurityTableLastParent
 
bool _declSecurityTableNeedsSorting
 
readonly List< EncLogRow_encLogTable = new List<EncLogRow>()
 
readonly List< EncMapRow_encMapTable = new List<EncMapRow>()
 
readonly List< EventRow_eventTable = new List<EventRow>()
 
readonly List< EventMapRow_eventMapTable = new List<EventMapRow>()
 
readonly List< ExportedTypeRow_exportedTypeTable = new List<ExportedTypeRow>()
 
readonly List< FieldLayoutRow_fieldLayoutTable = new List<FieldLayoutRow>()
 
readonly List< FieldMarshalRow_fieldMarshalTable = new List<FieldMarshalRow>()
 
int _fieldMarshalTableLastParent
 
bool _fieldMarshalTableNeedsSorting
 
readonly List< FieldRvaRow_fieldRvaTable = new List<FieldRvaRow>()
 
readonly List< FieldDefRow_fieldTable = new List<FieldDefRow>()
 
readonly List< FileTableRow_fileTable = new List<FileTableRow>()
 
readonly List< GenericParamConstraintRow_genericParamConstraintTable = new List<GenericParamConstraintRow>()
 
readonly List< GenericParamRow_genericParamTable = new List<GenericParamRow>()
 
readonly List< ImplMapRow_implMapTable = new List<ImplMapRow>()
 
readonly List< InterfaceImplRow_interfaceImplTable = new List<InterfaceImplRow>()
 
readonly List< ManifestResourceRow_manifestResourceTable = new List<ManifestResourceRow>()
 
readonly List< MemberRefRow_memberRefTable = new List<MemberRefRow>()
 
readonly List< MethodImplRow_methodImplTable = new List<MethodImplRow>()
 
readonly List< MethodSemanticsRow_methodSemanticsTable = new List<MethodSemanticsRow>()
 
int _methodSemanticsTableLastAssociation
 
bool _methodSemanticsTableNeedsSorting
 
readonly List< MethodSpecRow_methodSpecTable = new List<MethodSpecRow>()
 
readonly List< MethodRow_methodDefTable = new List<MethodRow>()
 
readonly List< ModuleRefRow_moduleRefTable = new List<ModuleRefRow>()
 
readonly List< NestedClassRow_nestedClassTable = new List<NestedClassRow>()
 
readonly List< ParamRow_paramTable = new List<ParamRow>()
 
readonly List< PropertyMapRow_propertyMapTable = new List<PropertyMapRow>()
 
readonly List< PropertyRow_propertyTable = new List<PropertyRow>()
 
readonly List< TypeDefRow_typeDefTable = new List<TypeDefRow>()
 
readonly List< TypeRefRow_typeRefTable = new List<TypeRefRow>()
 
readonly List< TypeSpecRow_typeSpecTable = new List<TypeSpecRow>()
 
readonly List< AssemblyRefTableRow_assemblyRefTable = new List<AssemblyRefTableRow>()
 
readonly List< StandaloneSigRow_standAloneSigTable = new List<StandaloneSigRow>()
 
readonly List< DocumentRow_documentTable = new List<DocumentRow>()
 
readonly List< MethodDebugInformationRow_methodDebugInformationTable = new List<MethodDebugInformationRow>()
 
readonly List< LocalScopeRow_localScopeTable = new List<LocalScopeRow>()
 
readonly List< LocalVariableRow_localVariableTable = new List<LocalVariableRow>()
 
readonly List< LocalConstantRow_localConstantTable = new List<LocalConstantRow>()
 
readonly List< ImportScopeRow_importScopeTable = new List<ImportScopeRow>()
 
readonly List< StateMachineMethodRow_stateMachineMethodTable = new List<StateMachineMethodRow>()
 
readonly List< CustomDebugInformationRow_customDebugInformationTable = new List<CustomDebugInformationRow>()
 
readonly Dictionary< string, UserStringHandle_userStrings = new Dictionary<string, UserStringHandle>(256)
 
readonly HeapBlobBuilder _userStringBuilder = new HeapBlobBuilder(4096)
 
readonly int _userStringHeapStartOffset
 
readonly Dictionary< string, StringHandle_strings = new Dictionary<string, StringHandle>(256)
 
readonly int _stringHeapStartOffset
 
int _stringHeapCapacity = 4096
 
readonly Dictionary< ImmutableArray< byte >, BlobHandle_blobs = new Dictionary<ImmutableArray<byte>, BlobHandle>(1024, ByteSequenceComparer.Instance)
 
readonly int _blobHeapStartOffset
 
int _blobHeapSize
 
readonly Dictionary< Guid, GuidHandle_guids = new Dictionary<Guid, GuidHandle>()
 
readonly HeapBlobBuilder _guidBuilder = new HeapBlobBuilder(16)
 

Detailed Description

Definition at line 7 of file MetadataBuilder.cs.


The documentation for this class was generated from the following file: