75 references to GetToken
Microsoft.CodeAnalysis (14)
Emit\EditAndContinue\DefinitionMap.cs (1)
385MetadataTokens.GetToken(localSignature),
NativePdbWriter\PdbWriter.cs (6)
101int methodToken = MetadataTokens.GetToken(methodHandle); 120UsingNamespace("@" + MetadataTokens.GetToken(_metadataWriter.GetMethodHandle(forwardToMethod)), methodBody.MethodDefinition); 137MetadataTokens.GetToken(_metadataWriter.GetMethodHandle(asyncMoveNextInfo.KickoffMethod)), 512MetadataTokens.GetToken(signatureHandle)); 526localSignatureHandleOpt.IsNil ? 0 : MetadataTokens.GetToken(localSignatureHandleOpt)); 730int token = MetadataTokens.GetToken(_metadataWriter.GetDefinitionHandle(definition.Definition));
NativePdbWriter\SymWriterMetadataProvider.cs (2)
74declaringTypeToken = MetadataTokens.GetToken(_writer.GetTypeHandle(m.GetContainingType(_writer.Context))); 87enclosingTypeToken = MetadataTokens.GetToken(_writer.GetTypeHandle(nt.GetContainingType(_writer.Context)));
PEWriter\MetadataWriter.cs (2)
2274typeDefinitionId: exportedType.IsForwarder ? 0 : MetadataTokens.GetToken(exportedType.Type.TypeDef)); 3299writer.WriteInt32(token == 0 ? MetadataTokens.GetToken(ResolveEntityHandleFromPseudoToken(pseudoToken)) : token);
PEWriter\PeWriter.cs (1)
125nativePdbWriterOpt?.SetEntryPoint(MetadataTokens.GetToken(debugEntryPointHandle));
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
74(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh))); 82(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh)));
Microsoft.CodeAnalysis.CSharp (8)
Symbols\Metadata\PE\PEAssemblySymbol.cs (1)
130return MetadataTokens.GetToken(_assembly.Handle);
Symbols\Metadata\PE\PEEventSymbol.cs (1)
240get { return MetadataTokens.GetToken(_handle); }
Symbols\Metadata\PE\PEFieldSymbol.cs (1)
188get { return MetadataTokens.GetToken(_handle); }
Symbols\Metadata\PE\PEMethodSymbol.cs (1)
450public override int MetadataToken => MetadataTokens.GetToken(_handle);
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
430get { return MetadataTokens.GetToken(_handle); }
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
477get { return MetadataTokens.GetToken(_handle); }
Symbols\Metadata\PE\PEPropertySymbol.cs (1)
438get { return MetadataTokens.GetToken(_handle); }
Symbols\Metadata\PE\PETypeParameterSymbol.cs (1)
127get { return MetadataTokens.GetToken(_handle); }
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.cs (1)
36yield return $"[0x{MetadataTokens.GetToken(typeRef.ResolutionScope):x8}] {readers.GetString(typeRef.Namespace)}.{readers.GetString(typeRef.Name)}";
Microsoft.CodeAnalysis.Debugging.Package (2)
CustomDebugInfoEncoder.cs (2)
74(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh))); 82(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh)));
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
MetadataResolver.cs (1)
352_onFunctionResolved(_module, request, token: MetadataTokens.GetToken(handle), version: 1, ilOffset: 0);
Microsoft.CodeAnalysis.Features (4)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (2)
59var symMethod = (ISymUnmanagedMethod2)_symReader.GetMethodByVersion(MetadataTokens.GetToken(methodHandle), _version); 67var methodToken = MetadataTokens.GetToken(methodHandle);
src\Dependencies\CodeAnalysis.Debugging\CustomDebugInfoEncoder.cs (2)
74(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh))); 82(mh, builder) => builder.WriteInt32(MetadataTokens.GetToken(mh)));
Microsoft.CodeAnalysis.Test.Utilities (2)
Compilation\CompilationDifference.cs (2)
95string actualPdb = PdbToXmlConverter.DeltaPdbToXml(new ImmutableMemoryStream(PdbDelta), new[] { MetadataTokens.GetToken(methodToken) }); 177EmitResult.UpdatedMethods.Select(methodHandle => $"0x{MetadataTokens.GetToken(methodHandle):X8}"));
Microsoft.CodeAnalysis.VisualBasic (7)
Symbols\Metadata\PE\PEEventSymbol.vb (1)
137Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PEFieldSymbol.vb (1)
80Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PEMethodSymbol.vb (1)
323Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PENamedTypeSymbol.vb (1)
244Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PEParameterSymbol.vb (1)
290Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PEPropertySymbol.vb (1)
163Return MetadataTokens.GetToken(_handle)
Symbols\Metadata\PE\PETypeParameterSymbol.vb (1)
122Return MetadataTokens.GetToken(_handle)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (1)
Emit\EditAndContinue\EditAndContinueTests.vb (1)
4915Yield $"[0x{MetadataTokens.GetToken(typeRef.ResolutionScope):x8}] 0x{MetadataTokens.GetHeapOffset(typeRef.Namespace):x8}.0x{MetadataTokens.GetHeapOffset(typeRef.Name):x8}"
Roslyn.Test.PdbUtilities (5)
Reader\CustomDebugInfoUtilities.cs (1)
21return reader.GetCustomDebugInfo(MetadataTokens.GetToken(handle), methodVersion);
Reader\PdbValidation.cs (2)
93VerifyPdb(diff, methodHandles.Select(h => MetadataTokens.GetToken(h)), expectedPdb); 98VerifyPdb(diff, methodHandles.Select(h => MetadataTokens.GetToken(h)), expectedPdb);
Shared\DummyMetadataImport.cs (2)
112baseType = MetadataTokens.GetToken(typeDef.BaseType); 151resolutionScope = MetadataTokens.GetToken(typeRef.ResolutionScope);
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
349=> (symbolIndex < symbols.Length && symbols[symbolIndex].MetadataToken == MetadataTokens.GetToken(handle)) ? symbols[symbolIndex++] : null;
System.Reflection.Emit (10)
System\Reflection\Emit\FieldBuilderImpl.cs (1)
89public override int MetadataToken => _handle == default ? 0 : MetadataTokens.GetToken(_handle);
System\Reflection\Emit\ILGeneratorImpl.cs (1)
474_il.Token(MetadataTokens.GetToken(handle));
System\Reflection\Emit\MethodBuilderImpl.cs (1)
252public override int MetadataToken => _handle == default ? 0 : MetadataTokens.GetToken(_handle);
System\Reflection\Emit\ModuleBuilderImpl.cs (6)
615pair.Value.WriteInt32(MetadataTokens.GetToken(GetMemberHandle(member))); 620pair.Value.WriteInt32(MetadataTokens.GetToken(GetMethodReference(pair2.Key, pair2.Value))); 1089return MetadataTokens.GetToken(handle); 1361MetadataTokens.GetToken(_metadataBuilder.AddStandaloneSignature(_metadataBuilder.GetOrAddBlob(signature.GetSignature()))); 1364MetadataTokens.GetToken(_metadataBuilder.AddStandaloneSignature( 1369MetadataTokens.GetToken(_metadataBuilder.AddStandaloneSignature(_metadataBuilder.GetOrAddBlob(
System\Reflection\Emit\TypeBuilderImpl.cs (1)
639public override int MetadataToken => MetadataTokens.GetToken(_handle);
System.Reflection.Metadata (6)
System\Reflection\Metadata\Ecma335\Encoding\ControlFlowBuilder.cs (1)
397ExceptionRegionKind.Catch => MetadataTokens.GetToken(handler.CatchType),
System\Reflection\Metadata\Ecma335\Encoding\ExceptionRegionEncoder.cs (1)
241catchTokenOrOffset = MetadataTokens.GetToken(catchType);
System\Reflection\Metadata\Ecma335\Encoding\InstructionEncoder.cs (1)
76Token(MetadataTokens.GetToken(handle));
System\Reflection\Metadata\Ecma335\Encoding\MethodBodyStreamEncoder.cs (1)
269Builder.WriteInt32(localVariablesSignature.IsNil ? 0 : MetadataTokens.GetToken(localVariablesSignature));
System\Reflection\Metadata\Ecma335\PortablePdbBuilder.cs (1)
110builder.WriteInt32(_entryPoint.IsNil ? 0 : MetadataTokens.GetToken(_entryPoint));
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (1)
166_entryPointOpt.IsNil ? 0 : MetadataTokens.GetToken(_entryPointOpt),
System.Reflection.MetadataLoadContext (13)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (13)
60public static int GetToken(this EntityHandle handle) => MetadataTokens.GetToken(handle); 61public static int GetToken(this TypeDefinitionHandle handle) => MetadataTokens.GetToken(handle); 62public static int GetToken(this TypeReferenceHandle handle) => MetadataTokens.GetToken(handle); 63public static int GetToken(this TypeSpecificationHandle handle) => MetadataTokens.GetToken(handle); 64public static int GetToken(this GenericParameterHandle handle) => MetadataTokens.GetToken(handle); 65public static int GetToken(this GenericParameterConstraintHandle handle) => MetadataTokens.GetToken(handle); 66public static int GetToken(this FieldDefinitionHandle handle) => MetadataTokens.GetToken(handle); 67public static int GetToken(this EventDefinitionHandle handle) => MetadataTokens.GetToken(handle); 68public static int GetToken(this MethodDefinitionHandle handle) => MetadataTokens.GetToken(handle); 69public static int GetToken(this PropertyDefinitionHandle handle) => MetadataTokens.GetToken(handle); 70public static int GetToken(this ParameterHandle handle) => MetadataTokens.GetToken(handle); 71public static int GetToken(this StandaloneSignatureHandle handle) => MetadataTokens.GetToken(handle); 72public static int GetToken(this AssemblyFileHandle handle) => MetadataTokens.GetToken(handle);