1 write to metadata
Microsoft.CodeAnalysis (1)
PEWriter\MetadataWriter.cs (1)
120this.metadata = metadata;
108 references to metadata
Microsoft.CodeAnalysis (108)
Emit\EditAndContinue\DeltaMetadataWriter.cs (15)
880BlobHandle blobIndex = metadata.GetOrAddBlob(writer); 1063metadata.AddCustomAttribute(deletedParentHandle, deletedMemberRefHandle, value: default); 1114metadata.AddEncLogEntry( 1147metadata.AddEncLogEntry( 1152metadata.AddEncLogEntry( 1168metadata.AddEncLogEntry( 1173metadata.AddEncLogEntry( 1191metadata.AddEncLogEntry( 1195metadata.AddEncLogEntry( 1205metadata.AddEncLogEntry( 1217metadata.AddEncLogEntry( 1232metadata.AddEncLogEntry( 1312metadata.AddEncMapEntry(token); 1427metadata.AddEventMap( 1437metadata.AddPropertyMap(
PEWriter\FullMetadataWriter.cs (2)
345metadata.AddEventMap( 363metadata.AddPropertyMap(
PEWriter\MetadataWriter.cs (91)
718result = metadata.GetOrAddBlob(writer); 821result = metadata.GetOrAddBlob(writer); 1061result = metadata.GetOrAddBlob(builder); 1077result = metadata.GetOrAddBlob(writer); 1085return metadata.GetOrAddBlob(descriptor); 1143result = metadata.GetOrAddBlob(signatureBlob); 1153BlobHandle result = metadata.GetOrAddBlob(writer); 1196BlobHandle blobIndex = metadata.GetOrAddBlob(builder); 1241result = metadata.GetOrAddBlob(writer); 1288var result = metadata.GetOrAddBlob(blob); 1318return metadata.GetOrAddString(path); 1324return metadata.GetOrAddString(name); 1345return metadata.GetOrAddString(namespaceName); 1653result = metadata.GetOrAddBlob(builder); 1718var typeSystemRowCounts = metadata.GetRowCounts(); 1732metadata.GetType().GetField("_customAttributeTableNeedsSorting", BindingFlags.Instance | BindingFlags.NonPublic)!.SetValue(metadata, false); 1738var rootBuilder = new MetadataRootBuilder(metadata, module.SerializationProperties.TargetRuntimeVersion, suppressValidation: true); 1862return new MetadataRootBuilder(metadata, module.SerializationProperties.TargetRuntimeVersion, suppressValidation: true); 1956metadata.SetCapacity(TableIndex.AssemblyRef, assemblyRefs.Count); 1961metadata.AddAssemblyReference( 1964culture: metadata.GetOrAddString(identity.CultureName), 1965publicKeyOrToken: metadata.GetOrAddBlob(identity.PublicKeyToken), 1988metadata.AddAssembly( 1992publicKey: metadata.GetOrAddBlob(sourceAssembly.Identity.PublicKey), 1994culture: metadata.GetOrAddString(sourceAssembly.Identity.CultureName)); 2078_dummyAssemblyAttributeParent[iS, iM] = metadata.AddTypeReference( 2080@namespace: metadata.GetOrAddString(dummyAssemblyAttributeParentNamespace), 2081name: metadata.GetOrAddString(dummyAssemblyAttributeParentName + dummyAssemblyAttributeParentQualifier[iS, iM])); 2139metadata.AddCustomAttribute( 2195metadata.AddDeclarativeSecurityAttribute( 2207metadata.SetCapacity(TableIndex.Event, eventDefs.Count); 2211metadata.AddEvent( 2231metadata.SetCapacity(TableIndex.ExportedType, exportedTypes.Length); 2269metadata.AddExportedType( 2287metadata.AddFieldLayout( 2308metadata.AddMarshallingDescriptor( 2326metadata.AddMarshallingDescriptor( 2358metadata.AddFieldRelativeVirtualAddress( 2368metadata.SetCapacity(TableIndex.Field, fieldDefs.Count); 2377metadata.AddFieldDefinition( 2394metadata.AddConstant( 2407metadata.AddConstant( 2420metadata.AddConstant( 2435metadata.SetCapacity(TableIndex.File, _fileRefList.Count); 2439metadata.AddAssemblyFile( 2441hashValue: metadata.GetOrAddBlob(fileReference.GetHashValue(hashAlgorithm)), 2454var genericParameterHandle = metadata.AddGenericParameter( 2462var genericConstraintHandle = metadata.AddGenericParameterConstraint( 2484: metadata.GetOrAddString(methodDef.Name); // Length checked while populating the method def table. 2486metadata.AddMethodImport( 2501var handle = metadata.AddInterfaceImplementation( 2517metadata.AddManifestResource( 2519name: metadata.GetOrAddString("<DynamicAnalysisData>"), 2539metadata.AddManifestResource( 2576metadata.SetCapacity(TableIndex.MemberRef, memberRefs.Count); 2580metadata.AddMemberReference( 2589metadata.SetCapacity(TableIndex.MethodImpl, methodImplList.Count); 2593metadata.AddMethodImplementation( 2603metadata.SetCapacity(TableIndex.MethodSpec, methodSpecs.Count); 2607metadata.AddMethodSpecification( 2616metadata.SetCapacity(TableIndex.MethodDef, methodDefs.Count); 2621metadata.AddMethodDefinition( 2639metadata.SetCapacity(TableIndex.MethodSemantics, propertyDefs.Count * 2 + eventDefs.Count * 2); 2660metadata.AddMethodSemantics( 2690metadata.AddMethodSemantics( 2701metadata.SetCapacity(TableIndex.ModuleRef, moduleRefs.Count); 2705metadata.AddModuleReference(GetStringHandleForPathAndCheckLength(moduleName)); 2718mvidHandle = metadata.GetOrAddGuid(mvid); 2724var reservedGuid = metadata.ReserveGuid(); 2730metadata.AddModule( 2732moduleName: metadata.GetOrAddString(this.module.ModuleName), 2734encId: metadata.GetOrAddGuid(EncId), 2735encBaseId: metadata.GetOrAddGuid(EncBaseId)); 2741metadata.SetCapacity(TableIndex.Param, parameterDefs.Count); 2745metadata.AddParameter( 2755metadata.SetCapacity(TableIndex.Property, propertyDefs.Count); 2759metadata.AddProperty( 2769metadata.SetCapacity(TableIndex.TypeDef, typeDefs.Count); 2781metadata.AddTypeDefinition( 2801metadata.AddNestedType( 2816metadata.AddTypeLayout( 2826metadata.SetCapacity(TableIndex.TypeRef, typeRefs.Count); 2876metadata.AddTypeReference( 2886metadata.SetCapacity(TableIndex.TypeSpec, typeSpecs.Count); 2890metadata.AddTypeSpecification(GetTypeSpecSignatureIndex(typeSpec)); 2900metadata.AddStandaloneSignature(signature); 3059BlobHandle blobIndex = metadata.GetOrAddBlob(builder); 3089BlobHandle blobIndex = metadata.GetOrAddBlob(builder); 3165return metadata.GetOrAddUserString(str); 3183return metadata.ReserveUserString(length);