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);
137 references to CustomAttributeHandle
BuildValidator (1)
Util.cs (1)
47foreach (var attributeHandle in reader.GetCustomAttributes(Handle.AssemblyDefinition))
Crossgen2Tasks (1)
PrepareForReadyToRunCompilation.cs (1)
440foreach (var attributeHandle in mdReader.GetAssemblyDefinition().GetCustomAttributes())
Microsoft.Cci.Extensions (1)
Extensions\CSharp\CSharpCciExtensions.cs (1)
897foreach (CustomAttributeHandle customAttributeHandle in customAttributeHandles)
Microsoft.CodeAnalysis (38)
DiagnosticAnalyzer\AnalyzerFileReference.cs (4)
34private delegate ImmutableArray<string> AttributeLanguagesFunc(PEModule module, CustomAttributeHandle attribute); 260foreach (CustomAttributeHandle customAttrHandle in typeDef.GetCustomAttributes()) 283private static ImmutableArray<string> GetDiagnosticsAnalyzerSupportedLanguages(PEModule peModule, CustomAttributeHandle customAttrHandle) 292private static ImmutableArray<string> GetGeneratorSupportedLanguages(PEModule peModule, CustomAttributeHandle customAttrHandle)
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)
1083internal CustomAttributeHandle GetAttributeHandle(EntityHandle token, AttributeDescription description) 1788private bool TryGetAttributeReader(CustomAttributeHandle handle, out BlobReader blobReader) 1934internal bool TryExtractStringValueFromAttribute(CustomAttributeHandle handle, out string? value) 1939internal bool TryExtractLongValueFromAttribute(CustomAttributeHandle handle, out long value) 1945private bool TryExtractDecimalValueFromDecimalConstantAttribute(CustomAttributeHandle handle, out decimal value) 1950private bool TryExtractIntAndIntValueFromAttribute(CustomAttributeHandle handle, out int value1, out int value2) 1963private bool TryExtractStringAndIntValueFromAttribute(CustomAttributeHandle handle, out string? stringValue, out int intValue) 1972private bool TryExtractStringAndStringValueFromAttribute(CustomAttributeHandle handle, out string? string1Value, out string? string2Value) 1980private bool TryExtractBoolArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<bool> value) 1985private bool TryExtractByteArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<byte> value) 1990private bool TryExtractStringArrayValueFromAttribute(CustomAttributeHandle handle, out ImmutableArray<string?> value) 1995private bool TryExtractValueFromAttribute<T>(CustomAttributeHandle handle, out T? value, AttributeValueExtractor<T?> valueExtractor) 2475public readonly CustomAttributeHandle Handle; 2478public AttributeInfo(CustomAttributeHandle handle, int signatureIndex) 2498foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2531foreach (var attributeHandle in metadataReader.GetCustomAttributes(hasAttribute)) 2557foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2578foreach (var attributeHandle in MetadataReader.GetCustomAttributes(hasAttribute)) 2614foreach (var attributeHandle in MetadataReader.GetCustomAttributes(typeDef)) 2636private void RegisterNoPiaLocalType(TypeDefinitionHandle typeDef, CustomAttributeHandle customAttribute, int signatureIndex) 2691private int IsTypeIdentifierAttribute(CustomAttributeHandle customAttribute) 2721CustomAttributeHandle customAttribute, 2742CustomAttributeHandle customAttribute, 2885internal int GetTargetAttributeSignatureIndex(CustomAttributeHandle customAttribute, AttributeDescription description) 2906private static int GetTargetAttributeSignatureIndex(MetadataReader metadataReader, CustomAttributeHandle customAttribute, AttributeDescription description, out bool matchedAttributeType) 3032CustomAttributeHandle customAttribute, 3046CustomAttributeHandle customAttribute, 3177foreach (var attributeHandle in MetadataReader.CustomAttributes) 3620public BlobHandle GetCustomAttributeValueOrThrow(CustomAttributeHandle handle)
Microsoft.CodeAnalysis.CSharp (26)
Symbols\Attributes\PEAttributeData.cs (2)
21private readonly CustomAttributeHandle _handle; 28internal PEAttributeData(PEModuleSymbol moduleSymbol, CustomAttributeHandle handle)
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
590out CustomAttributeHandle required,
Symbols\Metadata\PE\PEMethodSymbol.cs (2)
1019filteredOutAttribute1: out CustomAttributeHandle extensionAttribute, 1021filteredOutAttribute2: out CustomAttributeHandle isReadOnlyAttribute,
Symbols\Metadata\PE\PEModuleSymbol.cs (16)
273foreach (var customAttributeHandle in Module.GetCustomAttributesOrThrow(typerefAssemblyAttributesGoHere)) 310out CustomAttributeHandle filteredOutAttribute1, 317out CustomAttributeHandle filteredOutAttribute1, 319out CustomAttributeHandle filteredOutAttribute2, 330out CustomAttributeHandle filteredOutAttribute1, 332out CustomAttributeHandle filteredOutAttribute2, 334out CustomAttributeHandle filteredOutAttribute3, 336out CustomAttributeHandle filteredOutAttribute4, 338out CustomAttributeHandle filteredOutAttribute5, 340out CustomAttributeHandle filteredOutAttribute6, 353foreach (var customAttributeHandle in _module.GetCustomAttributesOrThrow(token)) 412bool matchesFilter(CustomAttributeHandle handle, AttributeDescription filter) 429out CustomAttributeHandle paramArrayAttribute) 438foreach (var attr in _module.GetCustomAttributesOrThrow(token)) 470filteredOutAttribute1: out CustomAttributeHandle extensionAttribute, 472filteredOutAttribute2: out CustomAttributeHandle isReadOnlyAttribute,
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
722out CustomAttributeHandle requiredHandle,
Symbols\Metadata\PE\PEParameterSymbol.cs (3)
1085CustomAttributeHandle paramArrayAttribute; 1086CustomAttributeHandle paramCollectionAttribute; 1087CustomAttributeHandle constantAttribute;
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
740out CustomAttributeHandle required,
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Attributes\AttributeTests_NativeInteger.cs (1)
1602private static string GetAttributeConstructorName(MetadataReader reader, CustomAttributeHandle handle)
Attributes\AttributeTests_Nullable.cs (1)
5411private static string GetAttributeConstructorName(MetadataReader reader, CustomAttributeHandle handle)
Attributes\AttributeTests_WellKnownAttributes.cs (3)
3334foreach (var ca in peReader.CustomAttributes) 4707foreach (var ca in metadataReader.CustomAttributes) 4816foreach (var ca in metadataReader.CustomAttributes)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
RequiredMemberAttributesVisitor.cs (1)
56var attribute = module.GetAttributeHandle(handle, AttributeDescription.RequiredMemberAttribute);
Microsoft.CodeAnalysis.Test.Utilities (6)
Metadata\MetadataReaderUtils.cs (1)
208foreach (var handle in reader.CustomAttributes)
Metadata\MetadataValidation.cs (5)
27internal static string GetAttributeName(MetadataReader metadataReader, CustomAttributeHandle customAttribute) 49internal static CustomAttributeHandle FindCustomAttribute(MetadataReader metadataReader, string attributeClassName) 51foreach (var caHandle in metadataReader.CustomAttributes) 59return default(CustomAttributeHandle); 70foreach (var ca in metadataReader.CustomAttributes)
Microsoft.CodeAnalysis.VisualBasic (8)
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\PEModuleSymbol.vb (2)
192<Out()> ByRef filteredOutAttribute1 As CustomAttributeHandle, 194<Out()> Optional ByRef filteredOutAttribute2 As CustomAttributeHandle = Nothing,
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
419Dim stdModuleAttribute As CustomAttributeHandle
Symbols\Metadata\PE\PEParameterSymbol.vb (2)
380Dim paramArrayAttribute As CustomAttributeHandle 381Dim constantAttribute As CustomAttributeHandle
Microsoft.DotNet.SignTool (1)
src\Configuration.cs (1)
603foreach (var attributeHandle in assemblyDef.GetCustomAttributes())
RunTests (1)
AssemblyScheduler.cs (1)
351foreach (var attributeHandle in attributes)
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)
1179public CustomAttribute GetCustomAttribute(CustomAttributeHandle handle) 1185private 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)
30private CustomAttributeHandle Handle 32get { 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);