3 instantiations of CustomAttributeHandle
System.Reflection.Metadata (3)
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (3)
1731return new CustomAttributeHandle(rowId); 1751return new CustomAttributeHandle(handle.RowId); 1761return new CustomAttributeHandle(handle.RowId);
176 references to CustomAttributeHandle
Crossgen2Tasks (1)
PrepareForReadyToRunCompilation.cs (1)
523foreach (var attributeHandle in mdReader.GetAssemblyDefinition().GetCustomAttributes())
ILCompiler.Compiler (17)
Compiler\AnalysisBasedMetadataManager.cs (4)
14using CustomAttributeHandle = System.Reflection.Metadata.CustomAttributeHandle; 252public bool GeneratesMetadata(EcmaModule module, CustomAttributeHandle caHandle) 311public readonly CustomAttributeHandle CustomAttributeHandle; 313public ReflectableCustomAttribute(EcmaModule module, CustomAttributeHandle caHandle)
Compiler\AssemblyExtensions.cs (1)
20CustomAttributeHandle attrHandle = reader.GetCustomAttributeHandle(assembly.AssemblyDefinition.GetCustomAttributes(),
Compiler\CustomAttributeExtensions.cs (5)
18var attributeHandle = metadataReader.GetCustomAttributeHandle(prop.GetCustomAttributes, 33foreach (var attributeHandle in attributeHandles) 47var attributeHandle = metadataReader.GetCustomAttributeHandle(@event.GetCustomAttributes, 62foreach (var attributeHandle in attributeHandles) 76foreach (var attributeHandle in attributeHandles)
Compiler\Dataflow\FlowAnnotations.cs (1)
310CustomAttributeHandle ca = reader.GetCustomAttributeHandle(customAttributeHandles, "System.Diagnostics.CodeAnalysis", "DynamicallyAccessedMembersAttribute");
Compiler\DependencyAnalysis\CustomAttributeBasedDependencyAlgorithm.cs (1)
106foreach (CustomAttributeHandle caHandle in attributeHandles)
Compiler\DependencyAnalysis\PInvokeMethodFixupNode.cs (1)
145var attrHandle = asm.MetadataReader.GetCustomAttributeHandle(asm.AssemblyDefinition.GetCustomAttributes(),
Compiler\UnmanagedEntryPointsRootProvider.cs (1)
34foreach (CustomAttributeHandle caHandle in reader.CustomAttributes)
Compiler\UsageBasedMetadataManager.cs (2)
23using CustomAttributeHandle = System.Reflection.Metadata.CustomAttributeHandle; 1040public bool GeneratesMetadata(EcmaModule module, CustomAttributeHandle caHandle)
src\runtime\src\coreclr\tools\Common\Compiler\TypeMapMetadata.cs (1)
306foreach (CustomAttributeHandle attrHandle in currentAssembly.MetadataReader.GetCustomAttributes(EntityHandle.AssemblyDefinition))
ILCompiler.MetadataTransform (3)
ILCompiler\Metadata\IMetadataPolicy.cs (1)
44bool GeneratesMetadata(Cts.Ecma.EcmaModule module, Ecma.CustomAttributeHandle customAttribute);
ILCompiler\Metadata\Transform.CustomAttribute.cs (2)
24foreach (var attributeHandle in attributes) 36private CustomAttribute HandleCustomAttribute(Cts.Ecma.EcmaModule module, Ecma.CustomAttributeHandle attributeHandle)
ILCompiler.ReadyToRun (4)
Compiler\AssemblyExtensions.cs (1)
25CustomAttributeHandle attributeHandle = reader.GetCustomAttributeHandle(attributeHandles, "System.Diagnostics", "DebuggableAttribute");
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (1)
47foreach (var handle in reader.CustomAttributes)
JitInterface\CorInfoImpl.ReadyToRun.cs (1)
606foreach (var attributeHandle in metadataReader.GetMethodDefinition(handle).GetCustomAttributes())
src\runtime\src\coreclr\tools\Common\Compiler\TypeMapMetadata.cs (1)
306foreach (CustomAttributeHandle attrHandle in currentAssembly.MetadataReader.GetCustomAttributes(EntityHandle.AssemblyDefinition))
ILCompiler.TypeSystem (25)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaField.cs (1)
175foreach (var attributeHandle in fieldDefinition.GetCustomAttributes())
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaMethod.cs (2)
186foreach (var attributeHandle in methodDefinition.GetCustomAttributes()) 528CustomAttributeHandle attributeHandle = reader.GetCustomAttributeHandle(
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaModule.cs (1)
803foreach (var attr in reader.GetAssemblyDefinition().GetCustomAttributes())
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.cs (2)
223foreach (CustomAttributeHandle attributeHandle in _typeDefinition.GetCustomAttributes()) 566var attrHandle = MetadataReader.GetCustomAttributeHandle(_typeDefinition.GetCustomAttributes(),
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.TypeEquivalence.cs (3)
26var attributeHandle = this.MetadataReader.GetCustomAttributeHandle(MetadataReader.GetAssemblyDefinition().GetCustomAttributes(), "System.Runtime.InteropServices", "GuidAttribute"); 84CustomAttributeHandle importedFromTypeLibHdl = this.MetadataReader.GetCustomAttributeHandle( 90CustomAttributeHandle primaryInteropAssemblyHdl = this.MetadataReader.GetCustomAttributeHandle(
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (13)
20var attributeHandle = metadataReader.GetCustomAttributeHandle(metadataReader.GetTypeDefinition(This.Handle).GetCustomAttributes(), 34foreach (var attributeHandle in attributeHandles) 48var attributeHandle = metadataReader.GetCustomAttributeHandle(metadataReader.GetMethodDefinition(This.Handle).GetCustomAttributes(), 62foreach (var attributeHandle in attributeHandles) 76var attributeHandle = metadataReader.GetCustomAttributeHandle(metadataReader.GetFieldDefinition(This.Handle).GetCustomAttributes(), 90foreach (var attributeHandle in attributeHandles) 104foreach (var attributeHandle in attributeHandles) 113public static CustomAttributeHandle GetCustomAttributeHandle(this MetadataReader metadataReader, CustomAttributeHandleCollection customAttributes, 116foreach (var attributeHandle in customAttributes) 124return default(CustomAttributeHandle); 127public static bool IsEqualCustomAttributeName(CustomAttributeHandle attributeHandle, MetadataReader metadataReader, 138public static bool GetAttributeNamespaceAndName(this MetadataReader metadataReader, CustomAttributeHandle attributeHandle, 152public static bool GetAttributeTypeAndConstructor(this MetadataReader metadataReader, CustomAttributeHandle attributeHandle,
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\UnsafeAccessors.cs (3)
565CustomAttributeHandle unsafeAccessorTypeAttributeHandle = FindUnsafeAccessorTypeAttribute(reader, parameter); 669private static CustomAttributeHandle FindUnsafeAccessorTypeAttribute(MetadataReader reader, Parameter parameter) 671foreach (CustomAttributeHandle customAttributeHandle in parameter.GetCustomAttributes())
Microsoft.Build.Tasks.Core (2)
AssemblyDependency\AssemblyInformation.cs (1)
459foreach (var attrHandle in metadataReader.GetAssemblyDefinition().GetCustomAttributes())
ManifestUtil\MetadataReader.cs (1)
89foreach (CustomAttributeHandle handle in col)
Microsoft.CodeAnalysis (39)
DiagnosticAnalyzer\AnalyzerFileReference.cs (4)
34private delegate ImmutableArray<string> AttributeLanguagesFunc(PEModule module, CustomAttributeHandle attribute); 263foreach (CustomAttributeHandle customAttrHandle in typeDef.GetCustomAttributes()) 286private static ImmutableArray<string> GetDiagnosticsAnalyzerSupportedLanguages(PEModule peModule, CustomAttributeHandle customAttrHandle) 295private static ImmutableArray<string> GetGeneratorSupportedLanguages(PEModule peModule, CustomAttributeHandle customAttrHandle)
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1064foreach (var handle in originalCustomAttributes)
MetadataReader\MetadataDecoder.cs (5)
1585CustomAttributeHandle customAttribute, 1607internal int GetTargetAttributeSignatureIndex(CustomAttributeHandle customAttribute, AttributeDescription description) 1620CustomAttributeHandle handle, 1682internal bool GetCustomAttribute(CustomAttributeHandle handle, [NotNullWhen(true)] out TypeSymbol? attributeClass, [NotNullWhen(true)] out MethodSymbol? attributeCtor) 1709internal bool GetCustomAttributeWellKnownType(CustomAttributeHandle handle, out WellKnownType wellKnownAttribute)
MetadataReader\PEModule.cs (29)
1114internal CustomAttributeHandle GetAttributeHandle(EntityHandle token, AttributeDescription description) 1838private bool TryGetAttributeReader(CustomAttributeHandle handle, out BlobReader blobReader) 1984internal bool TryExtractStringValueFromAttribute(CustomAttributeHandle handle, out string? value) 1989internal bool TryExtractLongValueFromAttribute(CustomAttributeHandle handle, out long value) 1995private bool TryExtractDecimalValueFromDecimalConstantAttribute(CustomAttributeHandle handle, out decimal value) 2000private bool TryExtractIntAndIntValueFromAttribute(CustomAttributeHandle handle, out int value1, out int value2) 2013private bool TryExtractStringAndIntValueFromAttribute(CustomAttributeHandle handle, out string? stringValue, out int intValue) 2022private bool TryExtractStringAndStringValueFromAttribute(CustomAttributeHandle handle, out string? string1Value, out string? string2Value) 2030private bool TryExtractBoolArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<bool> value) 2035private bool TryExtractByteArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<byte> value) 2040private bool TryExtractStringArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<string?> value) 2045private bool TryExtractValueFromAttribute<T>(CustomAttributeHandle handle, out T? value, AttributeValueExtractor<T?> valueExtractor) 2512public readonly CustomAttributeHandle Handle; 2515public AttributeInfo(CustomAttributeHandle handle, int signatureIndex) 2535foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2568foreach (var attributeHandle in metadataReader.GetCustomAttributes(hasAttribute)) 2594foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2615foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2651foreach (var attributeHandle in MetadataReader.GetCustomAttributes(typeDef)) 2673private void RegisterNoPiaLocalType(TypeDefinitionHandle typeDef, CustomAttributeHandle customAttribute, int signatureIndex) 2728private int IsTypeIdentifierAttribute(CustomAttributeHandle customAttribute) 2758CustomAttributeHandle customAttribute, 2779CustomAttributeHandle customAttribute, 2922internal int GetTargetAttributeSignatureIndex(CustomAttributeHandle customAttribute, AttributeDescription description) 2943private static int GetTargetAttributeSignatureIndex(MetadataReader metadataReader, CustomAttributeHandle customAttribute, AttributeDescription description, out bool matchedAttributeType) 3069CustomAttributeHandle customAttribute, 3083CustomAttributeHandle customAttribute, 3214foreach (var attributeHandle in MetadataReader.CustomAttributes) 3657public BlobHandle GetCustomAttributeValueOrThrow(CustomAttributeHandle handle)
Microsoft.CodeAnalysis.CSharp (16)
Symbols\Attributes\PEAttributeData.cs (2)
21private readonly CustomAttributeHandle _handle; 28internal PEAttributeData(PEModuleSymbol moduleSymbol, CustomAttributeHandle handle)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
159foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEEventSymbol.cs (1)
397foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
626foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
1073foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEModuleSymbol.cs (3)
283foreach (var customAttributeHandle in Module.GetCustomAttributesOrThrow(typerefAssemblyAttributesGoHere)) 326public bool AttributeMatchesFilter(CustomAttributeHandle handle, AttributeDescription filter) 341foreach (var attr in _module.GetCustomAttributesOrThrow(token))
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1004foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEParameterSymbol.cs (4)
1161CustomAttributeHandle paramArrayAttribute = default; 1162CustomAttributeHandle paramCollectionAttribute = default; 1163CustomAttributeHandle constantAttribute = default; 1165foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
839foreach (var handle in customAttributeHandles)
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
657foreach (var handle in customAttributeHandles)
Microsoft.CodeAnalysis.VisualBasic (10)
Symbols\Attributes\PEAttributeData.vb (2)
22Private ReadOnly _handle As CustomAttributeHandle 30Friend Sub New(moduleSymbol As PEModuleSymbol, handle As CustomAttributeHandle)
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
147Dim constantAttribute As CustomAttributeHandle
Symbols\Metadata\PE\PEMethodSymbol.vb (2)
652Dim discard1 As CustomAttributeHandle = Nothing 653Dim discard2 As CustomAttributeHandle = Nothing
Symbols\Metadata\PE\PEModuleSymbol.vb (2)
192<Out()> ByRef filteredOutAttribute1 As CustomAttributeHandle, 194<Out()> Optional ByRef filteredOutAttribute2 As CustomAttributeHandle = Nothing,
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
422Dim stdModuleAttribute As CustomAttributeHandle
Symbols\Metadata\PE\PEParameterSymbol.vb (2)
380Dim paramArrayAttribute As CustomAttributeHandle 381Dim constantAttribute As CustomAttributeHandle
Microsoft.Diagnostics.DataContractReader.Legacy (1)
MetaDataImportImpl.cs (1)
966foreach (CustomAttributeHandle caHandle in _reader.GetCustomAttributes(parent))
Microsoft.NET.Build.Tasks (1)
PrepareForReadyToRunCompilation.cs (1)
550foreach (var attributeHandle in mdReader.GetAssemblyDefinition().GetCustomAttributes())
Microsoft.NET.HostModel (6)
ComHost\ClsidMap.cs (6)
139CustomAttributeHandle handle = GetComVisibleAttribute(reader, assembly.GetCustomAttributes()); 156CustomAttributeHandle handle = GetComVisibleAttribute(metadataReader, typeDefinition.GetCustomAttributes()); 175private static CustomAttributeHandle GetComVisibleAttribute(MetadataReader reader, CustomAttributeHandleCollection customAttributes) 177foreach (CustomAttributeHandle attr in customAttributes) 192foreach (CustomAttributeHandle attr in type.GetCustomAttributes()) 206foreach (CustomAttributeHandle attr in type.GetCustomAttributes())
Microsoft.VisualStudio.TestPlatform.Common (1)
Utilities\MetadataReaderHelper.cs (1)
73foreach (var customAttributeHandle in metadataReader.CustomAttributes)
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
125foreach (CustomAttributeHandle attrHandle in assemblyDefinition.GetCustomAttributes())
System.Reflection.Metadata (38)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (2)
747public CustomAttributeHandle AddCustomAttribute(EntityHandle parent, EntityHandle constructor, BlobHandle value) 762return CustomAttributeHandle.FromRowId(_customAttributeTable.Count);
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (2)
435public static CustomAttributeHandle CustomAttributeHandle(int rowNumber) 437return Metadata.CustomAttributeHandle.FromRowId(ToRowId(rowNumber));
System\Reflection\Metadata\Internal\Tables.cs (3)
795internal EntityHandle GetParent(CustomAttributeHandle handle) 801internal EntityHandle GetConstructor(CustomAttributeHandle handle) 807internal BlobHandle GetValue(CustomAttributeHandle handle)
System\Reflection\Metadata\MetadataReader.cs (2)
1178public CustomAttribute GetCustomAttribute(CustomAttributeHandle handle) 1184private uint GetCustomAttributeTreatmentAndRowId(CustomAttributeHandle handle)
System\Reflection\Metadata\MetadataReader.WinMD.cs (6)
505foreach (var caHandle in GetCustomAttributes(methodDef)) 665internal CustomAttributeValueTreatment CalculateCustomAttributeValueTreatment(CustomAttributeHandle handle) 698private bool IsWindowsAttributeUsageAttribute(EntityHandle targetType, CustomAttributeHandle attributeHandle) 729foreach (var caHandle in GetCustomAttributes(token)) 743private bool GetAttributeTypeNameRaw(CustomAttributeHandle caHandle, out StringHandle namespaceName, out StringHandle typeName) 795private EntityHandle GetAttributeTypeRaw(CustomAttributeHandle handle)
System\Reflection\Metadata\TypeSystem\CustomAttribute.cs (2)
27private CustomAttributeHandle Handle 29get { return CustomAttributeHandle.FromRowId(RowId); }
System\Reflection\Metadata\TypeSystem\HandleCollections.TypeSystem.cs (8)
228public readonly struct CustomAttributeHandleCollection : IReadOnlyCollection<CustomAttributeHandle> 264IEnumerator<CustomAttributeHandle> IEnumerable<CustomAttributeHandle>.GetEnumerator() 274public struct Enumerator : IEnumerator<CustomAttributeHandle>, IEnumerator 293public CustomAttributeHandle Current 305return CustomAttributeHandle.FromRowId((int)(_currentRowId & TokenTypeIds.RIDMask)); 310private CustomAttributeHandle GetCurrentCustomAttributeIndirect() 312return CustomAttributeHandle.FromRowId(
System\Reflection\Metadata\TypeSystem\Handles.TypeSystem.cs (13)
1717public readonly struct CustomAttributeHandle : IEquatable<CustomAttributeHandle> 1729internal static CustomAttributeHandle FromRowId(int rowId) 1734public static implicit operator Handle(CustomAttributeHandle handle) 1739public static implicit operator EntityHandle(CustomAttributeHandle handle) 1744public static explicit operator CustomAttributeHandle(Handle handle) 1754public static explicit operator CustomAttributeHandle(EntityHandle handle) 1774public static bool operator ==(CustomAttributeHandle left, CustomAttributeHandle right) 1781return obj is CustomAttributeHandle && ((CustomAttributeHandle)obj)._rowId == _rowId; 1784public bool Equals(CustomAttributeHandle other) 1794public static bool operator !=(CustomAttributeHandle left, CustomAttributeHandle right)
System.Reflection.MetadataLoadContext (9)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs (2)
13private readonly CustomAttributeHandle _handle; 19internal EcmaCustomAttributeData(CustomAttributeHandle handle, EcmaModule module)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (5)
22foreach (CustomAttributeHandle handle in handles) 28public static CustomAttributeData ToCustomAttributeData(this CustomAttributeHandle handle, EcmaModule module) => new EcmaCustomAttributeData(handle, module); 37CustomAttributeHandle handle = handles.FindCustomAttributeByName(ns, name, module); 43private static CustomAttributeHandle FindCustomAttributeByName(this CustomAttributeHandleCollection handles, ReadOnlySpan<byte> ns, ReadOnlySpan<byte> name, EcmaModule module) 46foreach (CustomAttributeHandle handle in handles)
System\Reflection\TypeLoading\General\Ecma\EcmaDefaultValueProcessing.cs (1)
83foreach (CustomAttributeHandle handle in handles)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (1)
20public static CustomAttribute GetCustomAttribute(this CustomAttributeHandle handle, MetadataReader reader) => reader.GetCustomAttribute(handle);
vstest.console (1)
CommandLine\AssemblyMetadataProvider.cs (1)
136foreach (var customAttributeHandle in metadataReader.CustomAttributes)
vstest.console.arm64 (1)
src\vstest\src\vstest.console\CommandLine\AssemblyMetadataProvider.cs (1)
136foreach (var customAttributeHandle in metadataReader.CustomAttributes)