305 references to Module
Microsoft.CodeAnalysis.CSharp (115)
Compilation\CSharpCompilation.cs (1)
3423
resources = m.
Module
.GetEmbeddedResourcesOrThrow();
Emitter\Model\PEAssemblyBuilder.cs (1)
172
foreach (EmbeddedResource resource in ((Symbols.Metadata.PE.PEModuleSymbol)modules[i]).
Module
.GetEmbeddedResourcesOrThrow())
Symbols\Metadata\PE\DynamicTypeDecoder.cs (1)
74
if (containingModule.
Module
.HasDynamicAttribute(targetSymbolToken, out dynamicTransformFlags))
Symbols\Metadata\PE\MetadataDecoder.cs (1)
56
: base(moduleSymbol.
Module
, (moduleSymbol.ContainingAssembly is PEAssemblySymbol) ? moduleSymbol.ContainingAssembly.Identity : null, SymbolFactory.Instance, moduleSymbol)
Symbols\Metadata\PE\NativeIntegerTypeDecoder.cs (1)
25
return containingModule.
Module
.HasNativeIntegerAttribute(handle, out var transformFlags) ?
Symbols\Metadata\PE\NullableTypeDecoder.cs (1)
38
if (!containingModule.
Module
.HasNullableAttribute(targetSymbolToken, out defaultTransformFlag, out nullableTransformFlags))
Symbols\Metadata\PE\PEEventSymbol.cs (1)
76
var module = moduleSymbol.
Module
;
Symbols\Metadata\PE\PEFieldSymbol.cs (11)
149
moduleSymbol.
Module
.GetFieldDefPropsOrThrow(fieldDef, out _name, out _flags);
249
return _containingType.ContainingPEModule.
Module
.GetMarshallingType(_handle);
262
return _containingType.ContainingPEModule.
Module
.GetMarshallingDescriptor(_handle);
270
return _containingType.ContainingPEModule.
Module
.GetFieldOffset(_handle);
324
moduleSymbol.
Module
.HasIsReadOnlyAttribute(_handle) ? RefKind.RefReadOnly : RefKind.Ref :
352
if (containingPEModule.
Module
.HasFixedBufferAttribute(_handle, out elementTypeName, out bufferSize))
406
value = DecodeFlowAnalysisAttributes(_containingType.ContainingPEModule.
Module
, _handle);
488
value = _containingType.ContainingPEModule.
Module
.GetConstantFieldValue(_handle);
497
if (_containingType.ContainingPEModule.
Module
.HasDecimalConstantAttribute(Handle, out defaultValue))
617
containingPEModuleSymbol.
Module
.FindLastTargetAttribute(_handle, AttributeDescription.DecimalConstantAttribute).Handle);
685
hasRequiredMemberAttribute = ContainingPEModule.
Module
.HasAttribute(_handle, AttributeDescription.RequiredMemberAttribute);
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (1)
90
groups = _moduleSymbol.
Module
.GroupTypesByNamespaceOrThrow(System.StringComparer.Ordinal);
Symbols\Metadata\PE\PEMethodSymbol.cs (14)
391
moduleSymbol.
Module
.GetMethodDefPropsOrThrow(methodDef, out _name, out implFlags, out localflags, out rva);
444
? _containingType.ContainingPEModule.
Module
.GetDllImportData(_handle)
516
MetadataDecoder.GetSignatureCountsOrThrow(_containingType.ContainingPEModule.
Module
, _handle, out parameterCount, out typeParameterCount);
619
MetadataDecoder.GetSignatureCountsOrThrow(_containingType.ContainingPEModule.
Module
, _handle,
649
bool doesNotReturn = moduleSymbol.
Module
.HasDoesNotReturnAttribute(_handle);
681
var module = _containingType.ContainingPEModule.
Module
;
894
var gpHandles = moduleSymbol.
Module
.GetGenericParametersForMethodOrThrow(_handle);
936
isExtensionMethod = moduleSymbol.
Module
.HasExtensionAttribute(_handle, ignoreCase: false);
1043
value = _containingType.ContainingPEModule.
Module
.HasNullableContextAttribute(_handle, out byte arg) ?
1353
isReadOnly = moduleSymbol.
Module
.HasIsReadOnlyAttribute(_handle);
1482
var result = _containingType.ContainingPEModule.
Module
.GetConditionalAttributeValues(_handle);
1514
var result = _containingType.ContainingPEModule.
Module
.HasAttribute(_handle, AttributeDescription.SetsRequiredMembersAttribute);
1564
var unmanagedCallersOnlyData = containingModule.
Module
.TryGetUnmanagedCallersOnlyAttribute(_handle, new MetadataDecoder(containingModule),
1644
bool unscopedRef = moduleSymbol.
Module
.HasUnscopedRefAttribute(_handle);
Symbols\Metadata\PE\PEModuleSymbol.cs (6)
256
EntityHandle assemblyMSCorLib =
Module
.GetAssemblyRef(corlibName);
262
Module
.GetTypeRef(
271
foreach (var customAttributeHandle in
Module
.GetCustomAttributesOrThrow(typerefAssemblyAttributesGoHere))
411
=> filter.Signatures != null &&
Module
.GetTargetAttributeSignatureIndex(handle, filter) != -1;
734
(int firstIndex, int secondIndex) = this.
Module
.GetAssemblyRefsForForwardedType(fullName.FullName, ignoreCase: false, matchedName: out matchedName);
756
foreach (KeyValuePair<string, (int FirstIndex, int SecondIndex)> forwarder in
Module
.GetForwardedTypes())
Symbols\Metadata\PE\PENamedTypeSymbol.cs (30)
215
genericParameterHandles = moduleSymbol.
Module
.GetTypeDefGenericParamsOrThrow(handle);
288
metadataName = moduleSymbol.
Module
.GetTypeDefNameOrThrow(handle);
301
_flags = moduleSymbol.
Module
.GetTypeDefFlagsOrThrow(handle);
432
uncommon.lazyHasInterpolatedStringHandlerAttribute = ContainingPEModule.
Module
.HasInterpolatedStringHandlerAttribute(_handle).ToThreeState();
451
uncommon.lazyHasEmbeddedAttribute = ContainingPEModule.
Module
.HasCodeAnalysisEmbeddedAttribute(_handle).ToThreeState();
535
EntityHandle token = moduleSymbol.
Module
.GetBaseTypeOfTypeOrThrow(_handle);
555
var interfaceImpls = moduleSymbol.
Module
.GetInterfaceImplementationsOrThrow(_handle);
564
EntityHandle interfaceHandle = moduleSymbol.
Module
.MetadataReader.GetInterfaceImplementation(interfaceImpl).Interface;
736
value = ContainingPEModule.
Module
.HasNullableContextAttribute(_handle, out byte arg) ?
763
var module = moduleSymbol.
Module
;
880
var hasRequiredMemberAttribute = ContainingPEModule.
Module
.HasAttribute(_handle, AttributeDescription.RequiredMemberAttribute);
901
var module = moduleSymbol.
Module
;
1030
foreach (var handle in this.ContainingPEModule.
Module
.GetFieldsOfTypeOrThrow(_handle))
1084
var module = this.ContainingPEModule.
Module
;
1191
var module = moduleSymbol.
Module
;
1277
var module = moduleSymbol.
Module
;
1720
var module = moduleSymbol.
Module
;
1850
var module = moduleSymbol.
Module
;
1886
var module = moduleSymbol.
Module
;
1945
var module = moduleSymbol.
Module
;
1972
var module = moduleSymbol.
Module
;
2004
var module = moduleSymbol.
Module
;
2087
if (this.ContainingPEModule.
Module
.HasRequiredAttributeAttribute(_handle))
2169
this.ContainingPEModule.
Module
.HasDefaultMemberAttribute(_handle, out defaultMemberName);
2204
return ContainingPEModule.
Module
.HasGuidAttribute(_handle, out guidString);
2211
return this.ContainingPEModule.
Module
.GetTypeLayout(_handle);
2253
var module = moduleSymbol.
Module
;
2281
var module = moduleSymbol.
Module
;
2339
ImmutableArray<string> conditionalSymbols = this.ContainingPEModule.
Module
.GetConditionalAttributeValues(_handle);
2381
var handle = this.ContainingPEModule.
Module
.GetAttributeUsageAttributeHandle(_handle);
Symbols\Metadata\PE\PENamespaceSymbol.cs (3)
249
var skipCheckForPiaType = !moduleSymbol.
Module
.ContainsNoPiaLocalTypes();
256
if (skipCheckForPiaType || !moduleSymbol.
Module
.IsNoPiaLocalType(t))
264
string typeDefName = moduleSymbol.
Module
.GetTypeDefNameOrThrow(t);
Symbols\Metadata\PE\PEParameterSymbol.cs (21)
268
moduleSymbol.
Module
.GetParamPropsOrThrow(handle, out _name, out _flags);
283
else if (moduleSymbol.
Module
.HasIsReadOnlyAttribute(handle))
305
hasUnscopedRefAttribute = _moduleSymbol.
Module
.HasUnscopedRefAttribute(_handle);
308
if (_moduleSymbol.
Module
.HasScopedRefAttribute(_handle))
314
else if (_moduleSymbol.
Module
.HasScopedRefAttribute(_handle))
526
value = _moduleSymbol.
Module
.GetParamDefaultValue(_handle);
562
if (_moduleSymbol.
Module
.HasDateTimeConstantAttribute(_handle, out value))
569
if (_moduleSymbol.
Module
.HasDecimalConstantAttribute(_handle, out value))
594
value = _packedFlags.SetWellKnownAttribute(flag, _moduleSymbol.
Module
.HasAttribute(_handle,
610
value = _packedFlags.SetWellKnownAttribute(flag, _moduleSymbol.
Module
.HasAttribute(_handle,
626
value = _packedFlags.SetWellKnownAttribute(flag, _moduleSymbol.
Module
.HasAttribute(_handle,
642
value = _packedFlags.SetWellKnownAttribute(flag, _moduleSymbol.
Module
.HasAttribute(_handle,
658
value = _packedFlags.SetWellKnownAttribute(flag, _moduleSymbol.
Module
.HasAttribute(_handle,
734
var info = _moduleSymbol.
Module
.FindTargetAttribute(_handle, AttributeDescription.CallerArgumentExpressionAttribute);
744
_moduleSymbol.
Module
.TryExtractStringValueFromAttribute(info.Handle, out var parameterName);
768
value = DecodeFlowAnalysisAttributes(_moduleSymbol.
Module
, _handle);
844
var (paramNames, hasAttribute) = _moduleSymbol.
Module
.GetInterpolatedStringHandlerArgumentAttributeValues(_handle);
900
return _moduleSymbol.
Module
.GetStringValuesOfNotNullIfNotNullAttribute(_handle);
957
return _moduleSymbol.
Module
.GetMarshallingDescriptor(_handle);
971
return _moduleSymbol.
Module
.GetMarshallingType(_handle);
984
_lazyIsParams = _moduleSymbol.
Module
.HasParamsAttribute(_handle).ToThreeState();
Symbols\Metadata\PE\PEPropertySymbol.cs (4)
165
var module = moduleSymbol.
Module
;
212
if (moduleSymbol.
Module
.HasIsReadOnlyAttribute(handle))
523
hasRequiredMemberAttribute = containingPEModuleSymbol.
Module
.HasAttribute(_handle, AttributeDescription.RequiredMemberAttribute);
538
hasUnscopedRefAttribute = containingPEModuleSymbol.
Module
.HasUnscopedRefAttribute(_handle);
Symbols\Metadata\PE\PETypeParameterSymbol.cs (5)
81
moduleSymbol.
Module
.GetGenericParamPropsOrThrow(handle, out _name, out flags);
160
PEModule peModule = moduleSymbol.
Module
;
427
return GetConstraintHandleCollection(((PEModuleSymbol)this.ContainingModule).
Module
);
476
if (((PEModuleSymbol)this.ContainingModule).
Module
.HasNullableAttribute(_handle, out byte value, out _))
521
PEModule module = moduleSymbol.
Module
;
Symbols\Metadata\PE\PEUtilities.cs (1)
13
string? disallowedFeature = module.
Module
.GetFirstUnsupportedCompilerFeatureFromToken(handle, decoder, allowedFeatures);
Symbols\Metadata\PE\SymbolFactory.cs (1)
107
if (!linkedAssemblies.IsDefaultOrEmpty || moduleSymbol.
Module
.ContainsNoPiaLocalTypes())
Symbols\Metadata\PE\TupleTypeDecoder.cs (2)
87
.
Module
107
.
Module
Symbols\ObsoleteAttributeHelpers.cs (1)
44
var obsoleteAttributeData = containingModule.
Module
.TryGetDeprecatedOrExperimentalOrObsoleteAttribute(token, new MetadataDecoder(containingModule), ignoreByRefLikeMarker, ignoreRequiredMemberMarker);
Symbols\Retargeting\RetargetingAssemblySymbol.cs (1)
115
modules[i] = new PEModuleSymbol(this, under.
Module
, under.ImportOptions, i);
Symbols\Retargeting\RetargetingSymbolTranslator.cs (4)
305
Debug.Assert(ReferenceEquals(((PEModuleSymbol)module).
Module
, addedModule.
Module
));
404
ReferenceEquals(((PEModuleSymbol)type.ContainingModule).
Module
, addedModule.
Module
));
Symbols\Source\SourceAssemblySymbol.cs (3)
186
if (peModuleSymbol.
Module
.ContainsNoPiaLocalTypes())
996
if (!((PEModuleSymbol)m).
Module
.IsCOFFOnly)
1026
foreach (var referencedModuleName in m.
Module
.GetReferencedManagedModulesOrThrow())
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (122)
CodeGen\CodeGenDynamicTests.cs (1)
2286
Assert.Equal(1, pe.
Module
.GetMetadataReader().GetTableRowCount(TableIndex.TypeSpec));
CodeGen\CodeGenReadonlyStructTests.cs (75)
838
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PENamedTypeSymbol)test).Handle));
1355
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Handle));
1356
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Signature.ReturnParam.Handle));
1357
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Handle));
1358
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Signature.ReturnParam.Handle));
1360
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p1).Handle));
1361
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle));
1362
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle));
1363
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.SetMethod).Handle));
1364
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.SetMethod).Signature.ReturnParam.Handle));
1366
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p2).Handle));
1367
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle));
1368
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle));
1370
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p3).Handle));
1371
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle));
1372
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle));
1373
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.SetMethod).Handle));
1374
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.SetMethod).Signature.ReturnParam.Handle));
1376
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p4).Handle));
1377
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle));
1378
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle));
1379
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.SetMethod).Handle));
1380
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.SetMethod).Signature.ReturnParam.Handle));
1382
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p5).Handle));
1383
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle));
1384
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle));
1385
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.SetMethod).Handle));
1386
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.SetMethod).Signature.ReturnParam.Handle));
1428
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Handle));
1429
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Signature.ReturnParam.Handle));
1431
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Handle));
1432
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Signature.ReturnParam.Handle));
1434
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m3).Handle));
1435
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m3).Signature.ReturnParam.Handle));
1437
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m4).Handle));
1438
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m4).Signature.ReturnParam.Handle));
1440
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p1).Handle));
1441
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle));
1442
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle));
1444
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p2).Handle));
1445
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle));
1446
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle));
1448
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p3).Handle));
1449
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle));
1450
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle));
1452
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p4).Handle));
1453
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle));
1454
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle));
1493
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Handle));
1494
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m1).Signature.ReturnParam.Handle));
1495
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Handle));
1496
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)m2).Signature.ReturnParam.Handle));
1498
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p1).Handle));
1499
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Handle));
1500
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p1.GetMethod).Signature.ReturnParam.Handle));
1502
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p2).Handle));
1503
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Handle));
1504
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p2.GetMethod).Signature.ReturnParam.Handle));
1506
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p3).Handle));
1507
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Handle));
1508
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.GetMethod).Signature.ReturnParam.Handle));
1509
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.SetMethod).Handle));
1510
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p3.SetMethod).Signature.ReturnParam.Handle));
1512
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p4).Handle));
1513
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Handle));
1514
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.GetMethod).Signature.ReturnParam.Handle));
1515
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.SetMethod).Handle));
1516
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p4.SetMethod).Signature.ReturnParam.Handle));
1518
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEPropertySymbol)p5).Handle));
1519
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Handle));
1520
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.GetMethod).Signature.ReturnParam.Handle));
1521
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.SetMethod).Handle));
1522
Assert.False(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)p5.SetMethod).Signature.ReturnParam.Handle));
2602
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)testStruct.GetEvent("E").AddMethod).Handle));
2603
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)testStruct.GetEvent("E").RemoveMethod).Handle));
Emit\EditAndContinue\SymbolMatcherTests.cs (7)
557
var reader0 = peModule0.
Module
.MetadataReader;
626
var reader0 = peModule0.
Module
.MetadataReader;
1326
var reader0 = peModule0.
Module
.MetadataReader;
1759
var reader0 = peModule0.
Module
.MetadataReader;
1826
var reader0 = peModule0.
Module
.MetadataReader;
1885
var reader0 = peModule0.
Module
.MetadataReader;
1952
var reader0 = peModule0.
Module
.MetadataReader;
Emit\EmitMetadataTests.cs (2)
474
Assert.Equal(10, ((PEModuleSymbol)module).
Module
.GetMetadataReader().TypeReferences.Count);
526
Assert.Equal(5, peModuleSymbol.
Module
.GetMetadataReader().TypeReferences.Count);
Emit\NoPiaEmbedTypes.cs (37)
1170
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
1454
var metadata = ((PEModuleSymbol)module).
Module
;
1729
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
1902
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
1989
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2197
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2706
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2778
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2842
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2903
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
2969
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3035
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3100
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3165
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3233
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3324
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3383
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3448
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3755
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3850
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
3950
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4034
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4111
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4176
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4241
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4301
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4361
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
4427
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
5308
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
5668
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
5736
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
5785
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
5790
Assert.Equal("x", ((PEModuleSymbol)module).
Module
.GetParamNameOrThrow(p.Handle));
5794
Assert.Equal("value", ((PEModuleSymbol)module).
Module
.GetParamNameOrThrow(p.Handle));
5798
Assert.Equal("Param", ((PEModuleSymbol)module).
Module
.GetParamNameOrThrow(p.Handle));
5811
Assert.True(((PEModuleSymbol)p1.ContainingModule).
Module
.MetadataReader.GetParameter(p1.Handle).Name.IsNil);
5820
Assert.True(((PEModuleSymbol)p2.ContainingModule).
Module
.MetadataReader.GetParameter(p2.Handle).Name.IsNil);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (15)
Attributes\AttributeTests.cs (1)
1594
var metadata = ((PEModuleSymbol)module).
Module
;
Attributes\AttributeTests_Assembly.cs (1)
1781
var metadata = module.
Module
;
Attributes\AttributeTests_IsByRefLike.cs (6)
45
Assert.True(peModule.
Module
.HasIsByRefLikeAttribute(((PENamedTypeSymbol)type).Handle));
102
Assert.True(peModule.
Module
.HasIsByRefLikeAttribute(((PENamedTypeSymbol)type).Handle));
682
Assert.True(peModule.
Module
.HasIsByRefLikeAttribute(peType.Handle));
1047
var obsoleteAttribute = peModule.
Module
.TryGetDeprecatedOrExperimentalOrObsoleteAttribute(peType.Handle, decoder, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
1065
var compilerFeatureRequiredToken = peModule.
Module
.GetFirstUnsupportedCompilerFeatureFromToken(peType.Handle, decoder, CompilerFeatureRequiredFeatures.RefStructs);
1068
compilerFeatureRequiredToken = peModule.
Module
.GetFirstUnsupportedCompilerFeatureFromToken(peType.Handle, decoder, CompilerFeatureRequiredFeatures.None);
Attributes\AttributeTests_ReadOnlyStruct.cs (1)
44
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PENamedTypeSymbol)type).Handle));
Attributes\AttributeTests_RefReadOnly.cs (3)
48
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEMethodSymbol)method).Signature.ReturnParam.Handle));
49
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEParameterSymbol)parameter).Handle));
72
Assert.True(peModule.
Module
.HasIsReadOnlyAttribute(((PEParameterSymbol)parameter).Handle));
Attributes\AttributeTests_WellKnownAttributes.cs (3)
522
var attributeInfo = PEModule.FindTargetAttribute(peModule.
Module
.MetadataReader, theParameter.Handle, AttributeDescription.DateTimeConstantAttribute, out _);
526
Assert.True(peModule.
Module
.TryExtractLongValueFromAttribute(attributeInfo.Handle, out attributeValue));
530
var constantValue = peModule.
Module
.GetParamDefaultValue(theParameter.Handle);
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler (4)
CompilationExtensions.cs (2)
55
var reader = module.
Module
.MetadataReader;
70
var id = m.
Module
.GetModuleVersionIdOrThrow();
EEAssemblyBuilder.cs (1)
53
var module = moduleSymbol.
Module
;
EETypeNameDecoder.cs (1)
77
return ((PEModuleSymbol)module).
Module
.ReadAssemblyIdentityOrThrow();
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ExpressionCompiler.UnitTests (3)
ExpressionCompilerTestBase.cs (2)
245
var id = module.
Module
.GetModuleVersionIdOrThrow();
515
var symReader = runtime.Modules.Single(mi => mi.ModuleVersionId == peModule.
Module
.GetModuleVersionIdOrThrow()).SymReader;
InstructionDecoderTests.cs (1)
456
((PEModuleSymbol)frame.ContainingModule).
Module
.GetModuleVersionIdOrThrow(),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\RefFieldTests.cs (2)
547
var reader = module.
Module
.MetadataReader;
2012
var reader = module.
Module
.MetadataReader;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
6231
((PEModuleSymbol)module).
Module
.PretendThereArentNoPiaLocalTypes();
Symbols\CompilationCreationTests.cs (2)
2578
Assert.Same(module1.
Module
, module2.
Module
);
Symbols\DefaultInterfaceImplementationTests.cs (9)
225
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)m1.OriginalDefinition).Handle, out _, out _, out _, out rva);
2146
((PEModuleSymbol)m).
Module
.GetMethodDefPropsOrThrow(result.Handle, out _, out _, out _, out rva);
2730
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.GetMethod).Handle, out _, out _, out _, out rva);
2736
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)p1.SetMethod).Handle, out _, out _, out _, out rva);
6254
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)addE1).Handle, out _, out _, out _, out rva);
6260
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)rmvE1).Handle, out _, out _, out _, out rva);
32892
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)m1.OriginalDefinition).Handle, out _, out _, out _, out rva);
33729
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)m1).Handle, out _, out _, out _, out rva);
33845
peModule.
Module
.GetMethodDefPropsOrThrow(((PEMethodSymbol)m1).Handle, out _, out _, out _, out rva);
Symbols\GenericConstraintTests.cs (1)
6584
var metadata = ((PEModuleSymbol)module).
Module
;
Symbols\Metadata\PE\BaseTypeResolution.cs (8)
283
Assert.Equal(base1, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC1).Handle)]);
284
Assert.Equal(base2, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC2).Handle)]);
285
Assert.Equal(base3, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC3).Handle)]);
286
Assert.Equal(base4, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC4).Handle)]);
287
Assert.Equal(base5, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC5).Handle)]);
288
Assert.Equal(base6, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC6).Handle)]);
289
Assert.Equal(base7, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC7).Handle)]);
290
Assert.Equal(base8, module0.TypeRefHandleToTypeMap[(TypeReferenceHandle)module0.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)localTC8).Handle)]);
Symbols\Metadata\PE\TypeForwarders.cs (5)
65
Assert.Equal(base1, module1.TypeRefHandleToTypeMap[(TypeReferenceHandle)module1.
Module
.GetBaseTypeOfTypeOrThrow(((PENamedTypeSymbol)derived1).Handle)]);
1627
var metadata = module.
Module
;
1640
var peReader1 = ((PEModuleSymbol)m).
Module
.GetMetadataReader();
1681
metadata = module.
Module
;
1693
var peReader1 = ((PEModuleSymbol)m).
Module
.GetMetadataReader();
Symbols\RequiredMembersTests.cs (3)
97
var obsoleteAttribute = peModule.
Module
.TryGetDeprecatedOrExperimentalOrObsoleteAttribute(peMethod.Handle, decoder, ignoreByRefLikeMarker: false, ignoreRequiredMemberMarker: false);
98
string? unsupportedCompilerFeatureToken = peModule.
Module
.GetFirstUnsupportedCompilerFeatureFromToken(peMethod.Handle, decoder, CompilerFeatureRequiredFeatures.None);
112
Assert.Null(peModule.
Module
.GetFirstUnsupportedCompilerFeatureFromToken(peMethod.Handle, decoder, CompilerFeatureRequiredFeatures.RequiredMembers));
Symbols\Source\BaseClassTests.cs (4)
1099
Assert.Same(((PEModuleSymbol)B1.ContainingModule).
Module
, ((PEModuleSymbol)B2.ContainingModule).
Module
);
1225
Assert.Same(((PEModuleSymbol)B1.ContainingModule).
Module
, ((PEModuleSymbol)B2.ContainingModule).
Module
);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (7)
CSharpTestBase.cs (3)
1816
var bodyBlock = peModule.
Module
.GetMethodBodyOrThrow(method.Handle);
1832
var signature = peModule.
Module
.MetadataReader.GetStandaloneSignature(bodyBlock.LocalSignature).Signature;
1833
var signatureReader = peModule.
Module
.GetMemoryReaderOrThrow(signature);
LifetimeAnnotationAttributesVisitor.cs (1)
94
var module = ((PEModuleSymbol)parameter.ContainingModule).
Module
;
RequiredMemberAttributesVisitor.cs (3)
38
module = ((PEModuleSymbol)namedType.ContainingModule).
Module
;
43
module = ((PEModuleSymbol)field.ContainingModule).
Module
;
48
module = ((PEModuleSymbol)property.ContainingModule).
Module
;
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (4)
Metadata\WinMdDumpTest.cs (2)
131
((PEModuleSymbol)container.ContainingModule).
Module
.GetPropertyDefPropsOrThrow(property.Handle, out propertyName, out propertyAttrs);
174
((PEModuleSymbol)container.ContainingModule).
Module
.GetEventDefPropsOrThrow(evnt.Handle, out eventName, out eventAttrs, out type);
Metadata\WinMdMetadataTests.cs (2)
240
var attributeHandle = module.
Module
.MetadataReader.GetCustomAttributes(c.Handle).Single();
242
module.
Module
.TryExtractStringValueFromAttribute(attributeHandle, out value);