183 references to Kind
Crossgen2Tasks (3)
PrepareForReadyToRunCompilation.cs (3)
530if (attributeCtor.Kind == HandleKind.MemberReference) 533if (attributeMemberParent.Kind == HandleKind.TypeReference) 540else if (attributeCtor.Kind == HandleKind.MethodDefinition)
ILAssembler (2)
EntityRegistry.cs (2)
670_ = MetadataTokens.TryGetTableIndex(entityHandle.Kind, out var tableIndex); 962case TypeEntity { Handle.Kind: HandleKind.TypeDefinition } type:
ILCompiler.Compiler (10)
Compiler\UnmanagedEntryPointsRootProvider.cs (1)
71if (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 (2)
ILCompiler\Metadata\Transform.TypeForwarders.cs (2)
36if (exportedType.IsForwarder || exportedType.Implementation.Kind == Ecma.HandleKind.ExportedType) 60switch (exportedType.Implementation.Kind)
ILCompiler.ReadyToRun (20)
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 &&
JitInterface\CorInfoImpl.ReadyToRun.cs (2)
70switch (memberRef.Parent.Kind) 192switch (memberRef.Parent.Kind)
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 (16)
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 (5)
94switch (handle.Kind) 162switch (handle.Kind) 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 (4)
26HandleKind methodDeclHandleKind = methodDeclCheckHandle.Kind; 33methodDeclHandleKind = methodDeclCheckHandle.Kind; 70HandleKind methodDeclHandleKind = methodDeclCheckHandle.Kind; 78methodDeclHandleKind = methodDeclCheckHandle.Kind;
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\MetadataExtensions.cs (5)
157if (attributeCtor.Kind == HandleKind.MemberReference) 162else if (attributeCtor.Kind == HandleKind.MethodDefinition) 181if (attributeType.Kind == HandleKind.TypeReference) 184HandleKind handleType = typeRefRow.ResolutionScope.Kind; 194else if (attributeType.Kind == HandleKind.TypeDefinition)
Microsoft.Build.Tasks.Core (4)
AssemblyDependency\AssemblyInformation.cs (2)
559if (ctorHandle.Kind != HandleKind.MemberReference) 565if (container.Kind != HandleKind.TypeReference)
ManifestUtil\MetadataReader.cs (2)
94if (ctorHandle.Kind != HandleKind.MemberReference) 100if (mHandle.Kind != HandleKind.TypeReference)
Microsoft.CodeAnalysis (28)
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1121_ = MetadataTokens.TryGetTableIndex(parentHandle.Kind, out var parentTableIndex);
MetadataReader\MetadataDecoder.cs (13)
145HandleKind tokenType = token.Kind; 443switch (handle.Kind) 464throw ExceptionUtilities.UnexpectedValue(handle.Kind); 547HandleKind tokenType = tokenResolutionScope.Kind; 779switch (token.Kind) 909switch (token.Kind) 1913if (methodDebugHandle.Kind == HandleKind.MemberReference) 1928HandleKind implementedMethodTokenType = implementedMethodHandle.Kind; 2056if (typeToken.Kind == HandleKind.TypeDefinition) 2176switch (token.Kind) 2257HandleKind containerType = container.Kind; 2283HandleKind type = memberToken.Kind; 2293HandleKind type = memberToken.Kind;
MetadataReader\PEModule.cs (12)
421if (scope.Kind == HandleKind.ModuleReference) 2734if (MetadataReader.GetCustomAttribute(customAttribute).Parent.Kind != HandleKind.TypeDefinition) 2990HandleKind tokenType = token.Kind; 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; 3172else if (typeDefOrRef.Kind == HandleKind.TypeDefinition) 3360switch (methodDefOrRef.Kind) 3369throw ExceptionUtilities.UnexpectedValue(methodDefOrRef.Kind); 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)
124switch (memberRefOrMethodDef.Kind) 139throw ExceptionUtilities.UnexpectedValue(memberRefOrMethodDef.Kind);
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 (2)
PdbSourceDocument\ImplementationAssemblyLookupService.cs (1)
201if (et.IsForwarder && et.Implementation.Kind == HandleKind.AssemblyReference)
PdbSourceDocument\SymbolSourceDocumentFinder.cs (1)
18switch (handle.Kind)
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (2)
103Select Case memberRefOrMethodDef.Kind 115Throw ExceptionUtilities.UnexpectedValue(memberRefOrMethodDef.Kind)
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (3)
769if (typeDefOrRefHandle.Kind == HandleKind.TypeDefinition) 773else if (typeDefOrRefHandle.Kind == HandleKind.TypeReference) 865switch (baseTypeOrInterfaceHandle.Kind)
Microsoft.Diagnostics.DataContractReader.Contracts (2)
Contracts\RuntimeTypeSystem_1.cs (1)
2039if (entityHandle.Kind != HandleKind.TypeDefinition)
Contracts\Signature\RuntimeSignatureDecoder.cs (1)
285switch (handle.Kind)
Microsoft.Diagnostics.DataContractReader.Legacy (10)
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 (1)
133switch (handle.Kind)
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 (3)
ComHost\ClsidMap.cs (3)
82if (baseTypeEntity.Kind == HandleKind.TypeReference) 85if (baseClass.ResolutionScope.Kind == HandleKind.AssemblyReference) 222switch (attribute.Constructor.Kind)
Microsoft.VisualStudio.TestPlatform.Common (2)
Utilities\MetadataReaderHelper.cs (2)
89if (customAttribute.Constructor.Kind != HandleKind.MethodDefinition || customAttribute.Parent.Kind != HandleKind.AssemblyDefinition)
System.Diagnostics.FileVersionInfo (3)
System\Diagnostics\FileVersionInfo.Unix.cs (3)
257switch (ctorHandle.Kind) 261if (container.Kind == HandleKind.TypeReference) 292switch (ctorHandle.Kind)
System.Reflection.Metadata (47)
System\Reflection\Metadata\Ecma335\CodedIndex.cs (15)
36public static int HasCustomAttribute(EntityHandle handle) => (handle.RowId << (int)HasCustomAttributeTag.BitCount) | (int)ToHasCustomAttributeTag(handle.Kind); 43public static int HasConstant(EntityHandle handle) => (handle.RowId << (int)HasConstantTag.BitCount) | (int)ToHasConstantTag(handle.Kind); 50public static int CustomAttributeType(EntityHandle handle) => (handle.RowId << (int)CustomAttributeTypeTag.BitCount) | (int)ToCustomAttributeTypeTag(handle.Kind); 57public static int HasDeclSecurity(EntityHandle handle) => (handle.RowId << (int)HasDeclSecurityTag.BitCount) | (int)ToHasDeclSecurityTag(handle.Kind); 64public static int HasFieldMarshal(EntityHandle handle) => (handle.RowId << (int)HasFieldMarshalTag.BitCount) | (int)ToHasFieldMarshalTag(handle.Kind); 71public static int HasSemantics(EntityHandle handle) => (handle.RowId << (int)HasSemanticsTag.BitCount) | (int)ToHasSemanticsTag(handle.Kind); 78public static int Implementation(EntityHandle handle) => (handle.RowId << (int)ImplementationTag.BitCount) | (int)ToImplementationTag(handle.Kind); 85public static int MemberForwarded(EntityHandle handle) => (handle.RowId << (int)MemberForwardedTag.BitCount) | (int)ToMemberForwardedTag(handle.Kind); 98public static int MemberRefParent(EntityHandle handle) => (handle.RowId << (int)MemberRefParentTag.BitCount) | (int)ToMemberRefParentTag(handle.Kind); 105public static int MethodDefOrRef(EntityHandle handle) => (handle.RowId << (int)MethodDefOrRefTag.BitCount) | (int)ToMethodDefOrRefTag(handle.Kind); 112public static int ResolutionScope(EntityHandle handle) => (handle.RowId << (int)ResolutionScopeTag.BitCount) | (int)ToResolutionScopeTag(handle.Kind); 119public static int TypeDefOrRef(EntityHandle handle) => (handle.RowId << (int)TypeDefOrRefTag.BitCount) | (int)ToTypeDefOrRefTag(handle.Kind); 126public static int TypeDefOrRefOrSpec(EntityHandle handle) => (handle.RowId << (int)TypeDefOrRefOrSpecTag.BitCount) | (int)ToTypeDefOrRefOrSpecTag(handle.Kind); 133public static int TypeOrMethodDef(EntityHandle handle) => (handle.RowId << (int)TypeOrMethodDefTag.BitCount) | (int)ToTypeOrMethodDefTag(handle.Kind); 168public static int HasCustomDebugInformation(EntityHandle handle) => (handle.RowId << (int)HasCustomDebugInformationTag.BitCount) | (int)ToHasCustomDebugInformationTag(handle.Kind);
System\Reflection\Metadata\Ecma335\CustomAttributeDecoder.cs (3)
26switch (constructor.Kind) 38if (reference.Parent.Kind == HandleKind.TypeSpecification) 415handle.Kind switch
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 (2)
404switch (typeHandle.Kind) 428throw new ArgumentOutOfRangeException(nameof(typeHandle), SR.Format(SR.UnexpectedHandleKind, typeHandle.Kind));
System\Reflection\Metadata\Ecma335\SignatureDecoder.cs (1)
303switch (handle.Kind)
System\Reflection\Metadata\Internal\HasConstantTag.cs (1)
38HandleKind tokenKind = token.Kind;
System\Reflection\Metadata\Internal\NamespaceCache.cs (1)
364if (exportedType.Implementation.Kind == HandleKind.ExportedType)
System\Reflection\Metadata\MetadataReader.WinMD.cs (17)
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;
System\Reflection\Metadata\TypeSystem\ExportedType.cs (1)
31get { return Attributes.IsForwarder() && Implementation.Kind == HandleKind.AssemblyReference; }
System.Reflection.MetadataLoadContext (14)
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 (1)
60switch (ctorHandle.Kind)
System\Reflection\TypeLoading\CustomAttributes\Ecma\EcmaCustomAttributeHelpers.cs (3)
61switch (handle.Kind) 72return tr.ResolutionScope.Kind != HandleKind.TypeReference && tr.Name.Equals(name, reader) && tr.Namespace.Equals(ns, reader); 83switch (ctorHandle.Kind)
System\Reflection\TypeLoading\General\Ecma\EcmaResolver.cs (3)
19return handle.Kind switch 72HandleKind scopeKind = scope.Kind; 140return gp.Parent.Kind switch
System\Reflection\TypeLoading\General\Ecma\EcmaToStringHelpers.cs (3)
24HandleKind kind = handle.Kind; 60if (tr.ResolutionScope.Kind == HandleKind.TypeDefinition || tr.ResolutionScope.Kind == HandleKind.TypeReference)
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)