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