404 references to HandleKind
Crossgen2Tasks (3)
PrepareForReadyToRunCompilation.cs (3)
530if (attributeCtor.Kind == HandleKind.MemberReference) 533if (attributeMemberParent.Kind == HandleKind.TypeReference) 540else if (attributeCtor.Kind == HandleKind.MethodDefinition)
ILAssembler (1)
EntityRegistry.cs (1)
962case TypeEntity { Handle.Kind: HandleKind.TypeDefinition } type:
ILCompiler.Compiler (10)
Compiler\UnmanagedEntryPointsRootProvider.cs (1)
37if (ca.Parent.Kind != HandleKind.MethodDefinition)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (9)
374if (accessedType.Kind == HandleKind.TypeSpecification) 392if (accessedField.Kind == HandleKind.MemberReference) 407if (accessedMethod.Kind == HandleKind.MethodSpecification 408|| (accessedMethod.Kind == HandleKind.MemberReference 409&& _metadataReader.GetMemberReference((MemberReferenceHandle)accessedMethod).Parent.Kind == HandleKind.TypeSpecification)) 422if (accessedEntity.Kind == HandleKind.MethodSpecification 423|| (accessedEntity.Kind == HandleKind.MemberReference && _metadataReader.GetMemberReference((MemberReferenceHandle)accessedEntity).GetKind() == MemberReferenceKind.Method)) 428else if (accessedEntity.Kind == HandleKind.MemberReference) 433else if (accessedEntity.Kind == HandleKind.TypeSpecification)
ILCompiler.MetadataTransform (3)
ILCompiler\Metadata\Transform.TypeForwarders.cs (3)
36if (exportedType.IsForwarder || exportedType.Implementation.Kind == Ecma.HandleKind.ExportedType) 62case Ecma.HandleKind.AssemblyReference: 82case Ecma.HandleKind.ExportedType:
ILCompiler.ReadyToRun (33)
Compiler\DependencyAnalysis\ReadyToRun\AttributePresenceFilterNode.cs (6)
220if (customAttributeConstructorHandle.Kind == HandleKind.MethodDefinition) 227else if (customAttributeConstructorHandle.Kind == HandleKind.MemberReference) 232if (customAttributeConstructorReferenceParentHandle.Kind == HandleKind.TypeReference) 239Debug.Assert(customAttributeConstructorReferenceParentHandle.Kind == HandleKind.TypeSpecification); 245if (firstTypeHandle.Kind == HandleKind.TypeDefinition) 252Debug.Assert(firstTypeHandle.Kind == HandleKind.TypeReference);
Compiler\DependencyAnalysis\ReadyToRun\TypesTableNode.cs (1)
69if (expType.Implementation.Kind != HandleKind.ExportedType)
Compiler\ReadyToRunMetadataFieldLayoutAlgorithm.cs (1)
451return typeDefHandle.Kind == HandleKind.TypeDefinition &&
Compiler\ReadyToRunStandaloneMethodMetadata.cs (9)
129if (handle.Kind == HandleKind.TypeDefinition || handle.Kind == HandleKind.TypeReference) 138if (handle.Kind == HandleKind.UserString) 149else if (handle.Kind == HandleKind.TypeSpecification) 156else if (handle.Kind == HandleKind.MemberReference) 166else if (handle.Kind == HandleKind.MethodDefinition) 176else if (handle.Kind == HandleKind.FieldDefinition) 186else if (handle.Kind == HandleKind.MethodSpecification) 195else if (handle.Kind == HandleKind.StandaloneSignature)
JitInterface\CorInfoImpl.ReadyToRun.cs (6)
72case HandleKind.TypeDefinition: 73case HandleKind.TypeReference: 74case HandleKind.TypeSpecification: 194case HandleKind.TypeDefinition: 195case HandleKind.TypeReference: 196case HandleKind.TypeSpecification:
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (9)
374if (accessedType.Kind == HandleKind.TypeSpecification) 392if (accessedField.Kind == HandleKind.MemberReference) 407if (accessedMethod.Kind == HandleKind.MethodSpecification 408|| (accessedMethod.Kind == HandleKind.MemberReference 409&& _metadataReader.GetMemberReference((MemberReferenceHandle)accessedMethod).Parent.Kind == HandleKind.TypeSpecification)) 422if (accessedEntity.Kind == HandleKind.MethodSpecification 423|| (accessedEntity.Kind == HandleKind.MemberReference && _metadataReader.GetMemberReference((MemberReferenceHandle)accessedEntity).GetKind() == MemberReferenceKind.Method)) 428else if (accessedEntity.Kind == HandleKind.MemberReference) 433else if (accessedEntity.Kind == HandleKind.TypeSpecification)
TypeSystem\Mutable\MutableModule.cs (1)
112if (resolutionScope.Kind == HandleKind.AssemblyReference)
ILCompiler.TypeSystem (35)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaGenericParameter.cs (2)
70if (parameter.Parent.Kind == HandleKind.MethodDefinition) 76Debug.Assert(parameter.Parent.Kind == HandleKind.TypeDefinition);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaModule.cs (18)
96case HandleKind.TypeDefinition: 100case HandleKind.MethodDefinition: 109case HandleKind.FieldDefinition: 118case HandleKind.TypeReference: 122case HandleKind.MemberReference: 126case HandleKind.AssemblyReference: 130case HandleKind.TypeSpecification: 134case HandleKind.MethodSpecification: 138case HandleKind.ExportedType: 142case HandleKind.StandaloneSignature: 146case HandleKind.ModuleDefinition: 152case HandleKind.ModuleReference: 164case HandleKind.TypeDefinition: 165case HandleKind.MethodDefinition: 166case HandleKind.FieldDefinition: 260if (handle.Kind == HandleKind.MethodDefinition) 264else if (handle.Kind == HandleKind.AssemblyFile) 351if (exportDef.Implementation.Kind == HandleKind.ExportedType)
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\EcmaType.MethodImpls.cs (8)
26HandleKind methodDeclHandleKind = methodDeclCheckHandle.Kind; 30if (methodDeclHandleKind == HandleKind.MethodSpecification) 38HandleKind.MethodDefinition => metadataReader.GetMethodDefinition((MethodDefinitionHandle)methodDeclCheckHandle).Name, 39HandleKind.MemberReference => metadataReader.GetMemberReference((MemberReferenceHandle)methodDeclCheckHandle).Name, 70HandleKind methodDeclHandleKind = methodDeclCheckHandle.Kind; 75if (methodDeclHandleKind == HandleKind.MethodSpecification) 84case HandleKind.MethodDefinition: 88case HandleKind.MemberReference:
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (7)
157if (attributeCtor.Kind == HandleKind.MemberReference) 162else if (attributeCtor.Kind == HandleKind.MethodDefinition) 181if (attributeType.Kind == HandleKind.TypeReference) 184HandleKind handleType = typeRefRow.ResolutionScope.Kind; 187if (handleType == HandleKind.TypeReference || handleType == HandleKind.TypeDefinition) 194else if (attributeType.Kind == HandleKind.TypeDefinition)
Microsoft.Build.Tasks.Core (4)
AssemblyDependency\AssemblyInformation.cs (2)
464if (ctorHandle.Kind != HandleKind.MemberReference) 470if (container.Kind != HandleKind.TypeReference)
ManifestUtil\MetadataReader.cs (2)
92if (ctorHandle.Kind != HandleKind.MemberReference) 98if (mHandle.Kind != HandleKind.TypeReference)
Microsoft.CodeAnalysis (64)
MetadataReader\MetadataDecoder.cs (46)
145HandleKind tokenType = token.Kind; 149case HandleKind.TypeDefinition: 153case HandleKind.TypeSpecification: 158case HandleKind.TypeReference: 445case HandleKind.TypeDefinition: 449case HandleKind.TypeReference: 453case HandleKind.TypeSpecification: 547HandleKind tokenType = tokenResolutionScope.Kind; 553if (tokenType == HandleKind.TypeReference) 565if (tokenType == HandleKind.AssemblyReference) 576if (tokenType == HandleKind.ModuleReference) 781case HandleKind.TypeDefinition: 787case HandleKind.TypeReference: 793case HandleKind.TypeSpecification: 911case HandleKind.TypeSpecification: 929case HandleKind.TypeReference: 931case HandleKind.TypeDefinition: 1913if (methodDebugHandle.Kind == HandleKind.MemberReference) 1928HandleKind implementedMethodTokenType = implementedMethodHandle.Kind; 1932if (implementedMethodTokenType == HandleKind.MethodDefinition) 1936else if (implementedMethodTokenType == HandleKind.MemberReference) 2056if (typeToken.Kind == HandleKind.TypeDefinition) 2178case HandleKind.TypeDefinition: 2179case HandleKind.TypeSpecification: 2180case HandleKind.TypeReference: 2183case HandleKind.MethodDefinition: 2203case HandleKind.FieldDefinition: 2222case HandleKind.MethodSpecification: 2237case HandleKind.MemberReference: 2257HandleKind containerType = container.Kind; 2259containerType == HandleKind.MethodDefinition || 2260containerType == HandleKind.ModuleReference || 2261containerType == HandleKind.TypeDefinition || 2262containerType == HandleKind.TypeReference || 2263containerType == HandleKind.TypeSpecification); 2265if (containerType != HandleKind.TypeDefinition && 2266containerType != HandleKind.TypeReference && 2267containerType != HandleKind.TypeSpecification) 2283HandleKind type = memberToken.Kind; 2284Debug.Assert(type == HandleKind.MethodDefinition || type == HandleKind.MemberReference); 2286return type == HandleKind.MethodDefinition 2293HandleKind type = memberToken.Kind; 2294Debug.Assert(type == HandleKind.FieldDefinition || 2295type == HandleKind.MemberReference); 2297return type == HandleKind.FieldDefinition
MetadataReader\PEModule.cs (16)
421if (scope.Kind == HandleKind.ModuleReference) 2734if (MetadataReader.GetCustomAttribute(customAttribute).Parent.Kind != HandleKind.TypeDefinition) 2990HandleKind tokenType = token.Kind; 2994if (tokenType == HandleKind.TypeDefinition) 3008else if (tokenType == HandleKind.TypeReference) 3012if (typeRef.ResolutionScope.Kind == HandleKind.TypeReference) 3093if (attributeCtor.Kind == HandleKind.MemberReference) 3107else if (attributeCtor.Kind == HandleKind.MethodDefinition) 3158if (typeDefOrRef.Kind == HandleKind.TypeReference) 3161HandleKind handleType = typeRefRow.ResolutionScope.Kind; 3163if (handleType == HandleKind.TypeReference || handleType == HandleKind.TypeDefinition) 3172else if (typeDefOrRef.Kind == HandleKind.TypeDefinition) 3362case HandleKind.MethodDefinition: 3365case HandleKind.MemberReference: 3667return fieldOrParameterToken.Kind == HandleKind.FieldDefinition ?
PEWriter\MetadataWriter.cs (2)
3324Debug.Assert(handle.Kind is HandleKind.MethodDefinition); 3332Debug.Assert(handle.Kind is HandleKind.FieldDefinition);
Microsoft.CodeAnalysis.CSharp (7)
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
126case HandleKind.MemberReference: 132case HandleKind.MethodDefinition:
Symbols\Metadata\PE\PENamedTypeSymbol.cs (5)
1251if (baseTypeHandle.Kind == HandleKind.TypeSpecification) 1290if (baseTypeHandle.Kind == HandleKind.TypeDefinition) 1304if (baseTypeHandle.Kind == HandleKind.TypeReference) 1313while (typeRef.ResolutionScope.Kind == HandleKind.TypeReference) 1325if (typeRef.ResolutionScope.Kind == HandleKind.ModuleReference)
Microsoft.CodeAnalysis.Features (6)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
201if (et.IsForwarder && et.Implementation.Kind == HandleKind.AssemblyReference)
PdbSourceDocument\SymbolSourceDocumentFinder.cs (5)
20case HandleKind.MethodDefinition: 23case HandleKind.TypeDefinition: 26case HandleKind.FieldDefinition: 29case HandleKind.PropertyDefinition: 32case HandleKind.EventDefinition:
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (2)
104Case HandleKind.MemberReference 109Case HandleKind.MethodDefinition
Microsoft.CodeAnalysis.Workspaces (5)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (5)
769if (typeDefOrRefHandle.Kind == HandleKind.TypeDefinition) 773else if (typeDefOrRefHandle.Kind == HandleKind.TypeReference) 867case HandleKind.TypeDefinition: 868case HandleKind.TypeReference: 870case HandleKind.TypeSpecification:
Microsoft.Diagnostics.DataContractReader.Contracts (5)
Contracts\RuntimeTypeSystem_1.cs (2)
1136if (exportedType.Implementation.Kind != HandleKind.AssemblyReference || !exportedType.IsForwarder) 2052if (entityHandle.Kind != HandleKind.TypeDefinition)
Contracts\Signature\RuntimeSignatureDecoder.cs (3)
287case HandleKind.TypeDefinition: 290case HandleKind.TypeReference: 293case HandleKind.TypeSpecification:
Microsoft.Diagnostics.DataContractReader.Legacy (11)
ClrDataFrame.cs (2)
642if (baseType.Kind == HandleKind.TypeReference) 648else if (baseType.Kind == HandleKind.TypeDefinition)
MetaDataImportImpl.cs (6)
374if (owner.Kind == HandleKind.TypeDefinition) 376else if (owner.Kind == HandleKind.MethodDefinition) 1033if (constructor.Kind == HandleKind.MethodDefinition) 1039if (constructor.Kind == HandleKind.MemberReference) 1043if (parent.Kind == HandleKind.TypeReference) 1048if (parent.Kind == HandleKind.TypeDefinition)
SigFormat.cs (2)
135case HandleKind.TypeDefinition: 140case HandleKind.TypeReference:
TypeNameBuilder.cs (1)
236if (genericParam.Parent.Kind == HandleKind.TypeDefinition)
Microsoft.NET.Build.Tasks (3)
PrepareForReadyToRunCompilation.cs (3)
557if (attributeCtor.Kind == HandleKind.MemberReference) 560if (attributeMemberParent.Kind == HandleKind.TypeReference) 567else if (attributeCtor.Kind == HandleKind.MethodDefinition)
Microsoft.NET.HostModel (4)
ComHost\ClsidMap.cs (4)
82if (baseTypeEntity.Kind == HandleKind.TypeReference) 85if (baseClass.ResolutionScope.Kind == HandleKind.AssemblyReference) 224case HandleKind.MemberReference: 231case HandleKind.MethodDefinition:
Microsoft.VisualStudio.TestPlatform.Common (2)
Utilities\MetadataReaderHelper.cs (2)
89if (customAttribute.Constructor.Kind != HandleKind.MethodDefinition || customAttribute.Parent.Kind != HandleKind.AssemblyDefinition)
System.Diagnostics.FileVersionInfo (5)
System\Diagnostics\FileVersionInfo.Unix.cs (5)
259case HandleKind.MemberReference: 261if (container.Kind == HandleKind.TypeReference) 270case HandleKind.MethodDefinition: 294case HandleKind.MemberReference: 297case HandleKind.MethodDefinition:
System.Diagnostics.StackTrace (1)
System\Diagnostics\StackTraceSymbols.cs (1)
62if (!handle.IsNil && handle.Kind == HandleKind.MethodDefinition)
System.Reflection.Metadata (169)
System\Reflection\Metadata\Ecma335\CodedIndex.cs (99)
198private static HasCustomAttributeTag ToHasCustomAttributeTag(HandleKind kind) 202case HandleKind.MethodDefinition: return HasCustomAttributeTag.MethodDef; 203case HandleKind.FieldDefinition: return HasCustomAttributeTag.Field; 204case HandleKind.TypeReference: return HasCustomAttributeTag.TypeRef; 205case HandleKind.TypeDefinition: return HasCustomAttributeTag.TypeDef; 206case HandleKind.Parameter: return HasCustomAttributeTag.Param; 207case HandleKind.InterfaceImplementation: return HasCustomAttributeTag.InterfaceImpl; 208case HandleKind.MemberReference: return HasCustomAttributeTag.MemberRef; 209case HandleKind.ModuleDefinition: return HasCustomAttributeTag.Module; 210case HandleKind.DeclarativeSecurityAttribute: return HasCustomAttributeTag.DeclSecurity; 211case HandleKind.PropertyDefinition: return HasCustomAttributeTag.Property; 212case HandleKind.EventDefinition: return HasCustomAttributeTag.Event; 213case HandleKind.StandaloneSignature: return HasCustomAttributeTag.StandAloneSig; 214case HandleKind.ModuleReference: return HasCustomAttributeTag.ModuleRef; 215case HandleKind.TypeSpecification: return HasCustomAttributeTag.TypeSpec; 216case HandleKind.AssemblyDefinition: return HasCustomAttributeTag.Assembly; 217case HandleKind.AssemblyReference: return HasCustomAttributeTag.AssemblyRef; 218case HandleKind.AssemblyFile: return HasCustomAttributeTag.File; 219case HandleKind.ExportedType: return HasCustomAttributeTag.ExportedType; 220case HandleKind.ManifestResource: return HasCustomAttributeTag.ManifestResource; 221case HandleKind.GenericParameter: return HasCustomAttributeTag.GenericParam; 222case HandleKind.GenericParameterConstraint: return HasCustomAttributeTag.GenericParamConstraint; 223case HandleKind.MethodSpecification: return HasCustomAttributeTag.MethodSpec; 240private static HasConstantTag ToHasConstantTag(HandleKind kind) 244case HandleKind.FieldDefinition: return HasConstantTag.Field; 245case HandleKind.Parameter: return HasConstantTag.Param; 246case HandleKind.PropertyDefinition: return HasConstantTag.Property; 262private static CustomAttributeTypeTag ToCustomAttributeTypeTag(HandleKind kind) 266case HandleKind.MethodDefinition: return CustomAttributeTypeTag.MethodDef; 267case HandleKind.MemberReference: return CustomAttributeTypeTag.MemberRef; 284private static HasDeclSecurityTag ToHasDeclSecurityTag(HandleKind kind) 288case HandleKind.TypeDefinition: return HasDeclSecurityTag.TypeDef; 289case HandleKind.MethodDefinition: return HasDeclSecurityTag.MethodDef; 290case HandleKind.AssemblyDefinition: return HasDeclSecurityTag.Assembly; 306private static HasFieldMarshalTag ToHasFieldMarshalTag(HandleKind kind) 310case HandleKind.FieldDefinition: return HasFieldMarshalTag.Field; 311case HandleKind.Parameter: return HasFieldMarshalTag.Param; 327private static HasSemanticsTag ToHasSemanticsTag(HandleKind kind) 331case HandleKind.EventDefinition: return HasSemanticsTag.Event; 332case HandleKind.PropertyDefinition: return HasSemanticsTag.Property; 349private static ImplementationTag ToImplementationTag(HandleKind kind) 353case HandleKind.AssemblyFile: return ImplementationTag.File; 354case HandleKind.AssemblyReference: return ImplementationTag.AssemblyRef; 355case HandleKind.ExportedType: return ImplementationTag.ExportedType; 371private static MemberForwardedTag ToMemberForwardedTag(HandleKind kind) 375case HandleKind.FieldDefinition: return MemberForwardedTag.Field; 376case HandleKind.MethodDefinition: return MemberForwardedTag.MethodDef; 395private static MemberRefParentTag ToMemberRefParentTag(HandleKind kind) 399case HandleKind.TypeDefinition: return MemberRefParentTag.TypeDef; 400case HandleKind.TypeReference: return MemberRefParentTag.TypeRef; 401case HandleKind.ModuleReference: return MemberRefParentTag.ModuleRef; 402case HandleKind.MethodDefinition: return MemberRefParentTag.MethodDef; 403case HandleKind.TypeSpecification: return MemberRefParentTag.TypeSpec; 419private static MethodDefOrRefTag ToMethodDefOrRefTag(HandleKind kind) 423case HandleKind.MethodDefinition: return MethodDefOrRefTag.MethodDef; 424case HandleKind.MemberReference: return MethodDefOrRefTag.MemberRef; 442private static ResolutionScopeTag ToResolutionScopeTag(HandleKind kind) 446case HandleKind.ModuleDefinition: return ResolutionScopeTag.Module; 447case HandleKind.ModuleReference: return ResolutionScopeTag.ModuleRef; 448case HandleKind.AssemblyReference: return ResolutionScopeTag.AssemblyRef; 449case HandleKind.TypeReference: return ResolutionScopeTag.TypeRef; 466private static TypeDefOrRefOrSpecTag ToTypeDefOrRefOrSpecTag(HandleKind kind) 470case HandleKind.TypeDefinition: return TypeDefOrRefOrSpecTag.TypeDef; 471case HandleKind.TypeReference: return TypeDefOrRefOrSpecTag.TypeRef; 472case HandleKind.TypeSpecification: return TypeDefOrRefOrSpecTag.TypeSpec; 488private static TypeDefOrRefTag ToTypeDefOrRefTag(HandleKind kind) 492case HandleKind.TypeDefinition: return TypeDefOrRefTag.TypeDef; 493case HandleKind.TypeReference: return TypeDefOrRefTag.TypeRef; 509private static TypeOrMethodDefTag ToTypeOrMethodDefTag(HandleKind kind) 513case HandleKind.TypeDefinition: return TypeOrMethodDefTag.TypeDef; 514case HandleKind.MethodDefinition: return TypeOrMethodDefTag.MethodDef; 555private static HasCustomDebugInformationTag ToHasCustomDebugInformationTag(HandleKind kind) 559case HandleKind.MethodDefinition: return HasCustomDebugInformationTag.MethodDef; 560case HandleKind.FieldDefinition: return HasCustomDebugInformationTag.Field; 561case HandleKind.TypeReference: return HasCustomDebugInformationTag.TypeRef; 562case HandleKind.TypeDefinition: return HasCustomDebugInformationTag.TypeDef; 563case HandleKind.Parameter: return HasCustomDebugInformationTag.Param; 564case HandleKind.InterfaceImplementation: return HasCustomDebugInformationTag.InterfaceImpl; 565case HandleKind.MemberReference: return HasCustomDebugInformationTag.MemberRef; 566case HandleKind.ModuleDefinition: return HasCustomDebugInformationTag.Module; 567case HandleKind.DeclarativeSecurityAttribute: return HasCustomDebugInformationTag.DeclSecurity; 568case HandleKind.PropertyDefinition: return HasCustomDebugInformationTag.Property; 569case HandleKind.EventDefinition: return HasCustomDebugInformationTag.Event; 570case HandleKind.StandaloneSignature: return HasCustomDebugInformationTag.StandAloneSig; 571case HandleKind.ModuleReference: return HasCustomDebugInformationTag.ModuleRef; 572case HandleKind.TypeSpecification: return HasCustomDebugInformationTag.TypeSpec; 573case HandleKind.AssemblyDefinition: return HasCustomDebugInformationTag.Assembly; 574case HandleKind.AssemblyReference: return HasCustomDebugInformationTag.AssemblyRef; 575case HandleKind.AssemblyFile: return HasCustomDebugInformationTag.File; 576case HandleKind.ExportedType: return HasCustomDebugInformationTag.ExportedType; 577case HandleKind.ManifestResource: return HasCustomDebugInformationTag.ManifestResource; 578case HandleKind.GenericParameter: return HasCustomDebugInformationTag.GenericParam; 579case HandleKind.GenericParameterConstraint: return HasCustomDebugInformationTag.GenericParamConstraint; 580case HandleKind.MethodSpecification: return HasCustomDebugInformationTag.MethodSpec; 581case HandleKind.Document: return HasCustomDebugInformationTag.Document; 582case HandleKind.LocalScope: return HasCustomDebugInformationTag.LocalScope; 583case HandleKind.LocalVariable: return HasCustomDebugInformationTag.LocalVariable; 584case HandleKind.LocalConstant: return HasCustomDebugInformationTag.LocalConstant; 585case HandleKind.ImportScope: return HasCustomDebugInformationTag.ImportScope;
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (5)
28case HandleKind.MethodDefinition: 33case HandleKind.MemberReference: 38if (reference.Parent.Kind == HandleKind.TypeSpecification) 417HandleKind.TypeDefinition => _provider.GetTypeFromDefinition(_reader, (TypeDefinitionHandle)handle, 0), 418HandleKind.TypeReference => _provider.GetTypeFromReference(_reader, (TypeReferenceHandle)handle, 0),
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (3)
75(catchType.Kind == HandleKind.TypeDefinition || 76catchType.Kind == HandleKind.TypeSpecification || 77catchType.Kind == HandleKind.TypeReference);
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (3)
99if (methodHandle.Kind != HandleKind.MethodDefinition && 100methodHandle.Kind != HandleKind.MethodSpecification && 101methodHandle.Kind != HandleKind.MemberReference)
System\Reflection\Metadata\Ecma335\MetadataReaderExtensions.cs (3)
406case HandleKind.TypeDefinition: 410case HandleKind.TypeReference: 419case HandleKind.TypeSpecification:
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (15)
77/// A token can only be retrieved for a metadata table handle or a heap handle of type <see cref="HandleKind.UserString"/>. 99case HandleKind.AssemblyReference: 103case HandleKind.String: 104case HandleKind.Blob: 198/// A token can only be retrieved for a metadata table handle or a heap handle of type <see cref="HandleKind.UserString"/>. 228/// Gets the <see cref="TableIndex"/> of the table corresponding to the specified <see cref="HandleKind"/>. 233public static bool TryGetTableIndex(HandleKind type, out TableIndex index) 248/// Gets the <see cref="HeapIndex"/> of the heap corresponding to the specified <see cref="HandleKind"/>. 253public static bool TryGetHeapIndex(HandleKind type, out HeapIndex index) 257case HandleKind.UserString: 261case HandleKind.String: 262case HandleKind.NamespaceDefinition: 266case HandleKind.Blob: 270case HandleKind.Guid: 287/// It must encode a metadata table entity or an offset in <see cref="HandleKind.UserString"/> heap.
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (3)
305case HandleKind.TypeDefinition: 308case HandleKind.TypeReference: 311case HandleKind.TypeSpecification:
System\Reflection\Metadata\EntityHandle.cs (2)
79public HandleKind Kind 85return (HandleKind)(Type >> TokenTypeIds.RowIdBitCount);
System\Reflection\Metadata\Handle.cs (3)
124public HandleKind Kind 133return HandleKind.String; 136return (HandleKind)type;
System\Reflection\Metadata\HandleKind.cs (2)
57internal static bool IsHeapHandle(this HandleKind kind) 59return kind >= HandleKind.NamespaceDefinition;
System\Reflection\Metadata\Internal\HasConstantTag.cs (4)
38HandleKind tokenKind = token.Kind; 40if (tokenKind == HandleKind.FieldDefinition) 44else if (tokenKind == HandleKind.Parameter) 48else if (tokenKind == HandleKind.PropertyDefinition)
System\Reflection\Metadata\Internal\NamespaceCache.cs (1)
364if (exportedType.Implementation.Kind == HandleKind.ExportedType)
System\Reflection\Metadata\MetadataReader.WinMD.cs (19)
241if (extends.Kind == HandleKind.TypeReference && IsSystemAttribute((TypeReferenceHandle)extends)) 366if (extends.Kind != HandleKind.TypeReference) 420if (parentBaseType.Kind == HandleKind.TypeReference) 457if (declaration.Kind == HandleKind.MemberReference && 551if (baseTypeHandle.Kind == HandleKind.TypeReference) 612if (parent.Kind == HandleKind.TypeReference) 616else if (parent.Kind == HandleKind.TypeSpecification) 629if (token.Kind != HandleKind.TypeReference) 705if (targetType.Kind != HandleKind.TypeDefinition) 711if (attributeCtor.Kind != HandleKind.MemberReference) 717if (attributeType.Kind != HandleKind.TypeReference) 753if (typeDefOrRef.Kind == HandleKind.TypeReference) 758if (!resolutionScope.IsNil && resolutionScope.Kind == HandleKind.TypeReference) 769else if (typeDefOrRef.Kind == HandleKind.TypeDefinition) 799if (ctor.Kind == HandleKind.MethodDefinition) 804if (ctor.Kind == HandleKind.MemberReference) 809HandleKind handleType = typeDefOrRef.Kind; 811if (handleType == HandleKind.TypeReference || handleType == HandleKind.TypeDefinition)
System\Reflection\Metadata\PortablePdb\DocumentNameBlobHandle.cs (1)
16/// The kind of the handle is <see cref="HandleKind.Blob"/>.
System\Reflection\Metadata\PortablePdb\ImportDefinition.cs (4)
26typeOrNamespace.Kind == HandleKind.Blob || 27typeOrNamespace.Kind == HandleKind.TypeDefinition || 28typeOrNamespace.Kind == HandleKind.TypeReference || 29typeOrNamespace.Kind == HandleKind.TypeSpecification);
System\Reflection\Metadata\TypeSystem\ExportedType.cs (1)
31get { return Attributes.IsForwarder() && Implementation.Kind == HandleKind.AssemblyReference; }
System\Reflection\Throw.cs (1)
33internal static Exception InvalidArgument_UnexpectedHandleKind(HandleKind kind)
System.Reflection.MetadataLoadContext (31)
System\Reflection\TypeLoading\Assemblies\Ecma\EcmaAssembly.cs (1)
91if (implementation.Kind != HandleKind.AssemblyReference) // This check also weeds out nested types. This is intentional.
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeData.cs (3)
62case HandleKind.MethodDefinition: 69case HandleKind.MemberReference: 85case HandleKind.MethodSpecification:
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (5)
63case HandleKind.TypeDefinition: // Not clear if this can happen but as fail-safe.... 69case HandleKind.TypeReference: 72return tr.ResolutionScope.Kind != HandleKind.TypeReference && tr.Name.Equals(name, reader) && tr.Namespace.Equals(ns, reader); 85case HandleKind.MethodDefinition: 91case HandleKind.MemberReference:
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (10)
21HandleKind.TypeDefinition => ((TypeDefinitionHandle)handle).ResolveTypeDef(module), 22HandleKind.TypeReference => ((TypeReferenceHandle)handle).ResolveTypeRef(module), 23HandleKind.TypeSpecification => ((TypeSpecificationHandle)handle).ResolveTypeSpec(module, typeContext), 72HandleKind scopeKind = scope.Kind; 75case HandleKind.AssemblyReference: 85case HandleKind.TypeReference: 92case HandleKind.ModuleDefinition: 100case HandleKind.ModuleReference: 142HandleKind.TypeDefinition => new EcmaGenericTypeParameterType(gph, module), 143HandleKind.MethodDefinition => new EcmaGenericMethodParameterType(gph, module),
System\Reflection\TypeLoading\General\Ecma\EcmaToStringHelpers.cs (6)
24HandleKind kind = handle.Kind; 27case HandleKind.TypeDefinition: 30case HandleKind.TypeReference: 33case HandleKind.TypeSpecification: 60if (tr.ResolutionScope.Kind == HandleKind.TypeDefinition || tr.ResolutionScope.Kind == HandleKind.TypeReference)
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (3)
62HandleKind kind = handle.Kind; 65case HandleKind.MethodDefinition: 71case HandleKind.AssemblyFile:
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.GetTypeCore.cs (1)
49if (implementation.Kind != HandleKind.AssemblyReference) // This check also weeds out nested types. This is intentional.
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.ManifestResources.cs (2)
47if (resource.Implementation.Kind == HandleKind.AssemblyFile) 61else if (resource.Implementation.Kind == HandleKind.AssemblyReference)