140 references to Kind
BuildValidator (2)
Util.cs (2)
61switch (attribute.Constructor.Kind) 75Debug.Assert(memberRef.Parent.Kind == HandleKind.TypeReference);
Crossgen2Tasks (3)
PrepareForReadyToRunCompilation.cs (3)
447if (attributeCtor.Kind == HandleKind.MemberReference) 450if (attributeMemberParent.Kind == HandleKind.TypeReference) 457else if (attributeCtor.Kind == HandleKind.MethodDefinition)
Microsoft.Cci.Extensions (3)
Extensions\CSharp\CSharpCciExtensions.cs (3)
925switch (handle.Kind) 932return tr.ResolutionScope.Kind != HandleKind.TypeReference && !tr.Namespace.IsNil && tr.Namespace.Equals(@namespace, reader) && tr.Name.Equals(name, reader); 941switch (ctorHandle.Kind)
Microsoft.CodeAnalysis (28)
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1057_ = 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)
420if (scope.Kind == HandleKind.ModuleReference) 2697if (MetadataReader.GetCustomAttribute(customAttribute).Parent.Kind != HandleKind.TypeDefinition) 2953HandleKind tokenType = token.Kind; 2975if (typeRef.ResolutionScope.Kind == HandleKind.TypeReference) 3056if (attributeCtor.Kind == HandleKind.MemberReference) 3070else if (attributeCtor.Kind == HandleKind.MethodDefinition) 3121if (typeDefOrRef.Kind == HandleKind.TypeReference) 3124HandleKind handleType = typeRefRow.ResolutionScope.Kind; 3135else if (typeDefOrRef.Kind == HandleKind.TypeDefinition) 3323switch (methodDefOrRef.Kind) 3332throw ExceptionUtilities.UnexpectedValue(methodDefOrRef.Kind); 3630return fieldOrParameterToken.Kind == HandleKind.FieldDefinition ?
PEWriter\MetadataWriter.cs (2)
3272Debug.Assert(handle.Kind is HandleKind.MethodDefinition); 3280Debug.Assert(handle.Kind is HandleKind.FieldDefinition);
Microsoft.CodeAnalysis.CSharp (2)
Symbols\Metadata\PE\MemberRefMetadataDecoder.cs (2)
124switch (memberRefOrMethodDef.Kind) 139throw ExceptionUtilities.UnexpectedValue(memberRefOrMethodDef.Kind);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Emit\CompilationEmitTests.cs (1)
4219if (scope.Kind == HandleKind.TypeReference)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\EditAndContinueTestBase.cs (2)
176reader.GetEditAndContinueLogEntries().Where(e => IsDefinition(e.Handle.Kind)), itemInspector: EncLogRowToString); 198reader.GetEditAndContinueMapEntries().Where(e => IsDefinition(e.Kind)), itemInspector: EncMapRowToString);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
3337Assert.NotEqual(HandleKind.MethodDefinition, ctor.Kind);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Metadata\PE\TypeForwarders.cs (2)
1806Assert.Equal(HandleKind.ExportedType, exportedTypeRow.Implementation.Kind); 1814Assert.Equal(HandleKind.AssemblyReference, exportedTypeRow.Implementation.Kind);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
EmitMetadataTestBase.cs (2)
137switch (token.Kind) 155throw TestExceptionUtilities.UnexpectedValue(token.Kind);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Portable.cs (1)
107if (handle.Kind == HandleKind.MethodDebugInformation)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (2)
MetadataDecoder.cs (2)
191switch (handle.Kind) 233switch (scope.Kind)
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.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
402MetadataTokens.TryGetTableIndex(row.Handle.Kind, out tableIndex);
Microsoft.CodeAnalysis.Test.Utilities (8)
Metadata\MetadataReaderUtils.cs (6)
168switch (token.Kind) 175throw ExceptionUtilities.UnexpectedValue(token.Kind); 219switch (token.Kind) 228throw ExceptionUtilities.UnexpectedValue(token.Kind); 325string kind = handle.Kind.ToString(); 338switch (handle.Kind)
Metadata\MetadataValidation.cs (2)
30if (ctorHandle.Kind == HandleKind.MemberReference) // MemberRef 36else if (ctorHandle.Kind == HandleKind.MethodDefinition)
Microsoft.CodeAnalysis.VisualBasic (2)
Symbols\Metadata\PE\MemberRefMetadataDecoder.vb (2)
103Select Case memberRefOrMethodDef.Kind 115Throw ExceptionUtilities.UnexpectedValue(memberRefOrMethodDef.Kind)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Semantics\FieldInitializerBindingTests.vb (1)
1311If constant.Parent.Kind = HandleKind.Parameter Then
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\Metadata\PE\TypeForwarders.vb (2)
1232Assert.Equal(HandleKind.ExportedType, exportedTypeRow.Implementation.Kind) 1238Assert.Equal(HandleKind.AssemblyReference, exportedTypeRow.Implementation.Kind)
Microsoft.CodeAnalysis.Workspaces (3)
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (3)
590if (typeDefOrRefHandle.Kind == HandleKind.TypeDefinition) 594else if (typeDefOrRefHandle.Kind == HandleKind.TypeReference) 686switch (baseTypeOrInterfaceHandle.Kind)
Microsoft.DotNet.SignTool (2)
src\Configuration.cs (2)
631switch (ctorHandle.Kind) 635switch (container.Kind)
Roslyn.Test.PdbUtilities (4)
EditAndContinue\EditAndContinueTest.GenerationVerifier.cs (2)
103MetadataReader.GetEditAndContinueLogEntries().Where(e => IsDefinition(e.Handle.Kind)), itemInspector: EncLogRowToString, message: GetAssertMessage("EncLog definitions don't match")); 111MetadataReader.GetEditAndContinueMapEntries().Where(e => IsDefinition(e.Kind)), itemInspector: EncMapRowToString, message: GetAssertMessage("EncMap definitions don't match"));
EditAndContinue\EditAndContinueTestUtilities.cs (2)
41MetadataTokens.TryGetTableIndex(row.Handle.Kind, out tableIndex); 53MetadataTokens.TryGetTableIndex(handle.Kind, out tableIndex);
RunTests (2)
AssemblyScheduler.cs (2)
354if (attribute.Constructor.Kind is HandleKind.MemberReference) 357if (ctor.Parent.Kind is HandleKind.TypeReference)
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)
102if (methodHandle.Kind != HandleKind.MethodDefinition && 103methodHandle.Kind != HandleKind.MethodSpecification && 104methodHandle.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)
36get { 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)