3 instantiations of DocumentHandle
System.Reflection.Metadata (3)
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (3)
24return new DocumentHandle(rowId); 44return new DocumentHandle(handle.RowId); 54return new DocumentHandle(handle.RowId);
84 references to DocumentHandle
Microsoft.CodeAnalysis (15)
PEWriter\MetadataWriter.PortablePdb.cs (15)
54private readonly Dictionary<DebugSourceDocument, DocumentHandle> _documentIndex = new Dictionary<DebugSourceDocument, DocumentHandle>(); 71BlobHandle sequencePointsBlob = SerializeSequencePoints(localSignatureHandleOpt, bodyOpt.SequencePoints, _documentIndex, out var singleDocumentHandle); 629Dictionary<DebugSourceDocument, DocumentHandle> documentIndex, 630out DocumentHandle singleDocumentHandle) 634singleDocumentHandle = default(DocumentHandle); 647singleDocumentHandle = (previousDocument != null) ? GetOrAddDocument(previousDocument, documentIndex) : default(DocumentHandle); 654var documentHandle = GetOrAddDocument(currentDocument, documentIndex); 743private DocumentHandle GetOrAddDocument(DebugSourceDocument document, Dictionary<DebugSourceDocument, DocumentHandle> index) 745if (index.TryGetValue(document, out var documentHandle)) 753private DocumentHandle AddDocument(DebugSourceDocument document, Dictionary<DebugSourceDocument, DocumentHandle> index) 755DocumentHandle documentHandle; 1024var handle = GetOrAddDocument(document, _documentIndex);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
2489foreach (var handle in mdReader.Documents)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Portable.cs (1)
66var documentHandle = reader.GetMethodDebugInformation(methodHandle).Document;
Microsoft.CodeAnalysis.Features (12)
EditAndContinue\EditAndContinueMethodDebugInfoReader.cs (1)
157foreach (var documentHandle in _pdbReader.Documents)
PdbSourceDocument\DocumentDebugInfoReader.cs (3)
42foreach (var handle in documentHandles) 60private string? TryGetSourceLinkUrl(DocumentHandle handle) 90private byte[]? TryGetEmbeddedTextBytes(DocumentHandle handle)
PdbSourceDocument\SymbolSourceDocumentFinder.cs (8)
14public static HashSet<DocumentHandle> FindDocumentHandles(EntityHandle handle, MetadataReader dllReader, MetadataReader pdbReader) 16var docList = new HashSet<DocumentHandle>(); 40private static void ProcessMethodDef(MethodDefinitionHandle methodDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList, bool processDeclaringType) 72private static void ProcessEventDef(EventDefinitionHandle eventDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList) 97private static void ProcessPropertyDef(PropertyDefinitionHandle propertyDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList) 117private static void ProcessFieldDef(FieldDefinitionHandle fieldDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList) 124private static void ProcessTypeDef(TypeDefinitionHandle typeDefHandle, MetadataReader dllReader, MetadataReader pdbReader, HashSet<DocumentHandle> docList, bool processContainingType = true) 154private static void AddDocumentsFromTypeDefinitionDocuments(TypeDefinitionHandle typeDefHandle, MetadataReader pdbReader, HashSet<DocumentHandle> docList)
Microsoft.CodeAnalysis.Rebuild (4)
CompilationFactory.cs (1)
166foreach (var documentHandle in pdbReader.Documents.Skip(sourceFileCount))
CompilationOptionsReader.cs (3)
176private IEnumerable<(DocumentHandle DocumentHandle, SourceTextInfo SourceTextInfo)> GetSourceTextInfoCore() 180foreach (var documentHandle in PdbReader.Documents.Take(sourceFileCount)) 197private EmbeddedSourceTextInfo? ResolveEmbeddedSource(DocumentHandle document, SourceTextInfo sourceTextInfo)
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\MetadataReaderUtils.cs (1)
271public static SourceText GetEmbeddedSource(this MetadataReader reader, DocumentHandle document)
System.Reflection.Emit (4)
System\Reflection\Emit\ModuleBuilderImpl.cs (4)
29private Dictionary<SymbolDocumentWriter, DocumentHandle> _docHandles = new(); 591private DocumentHandle GetDocument(SymbolDocumentWriter docWriter) 593if (!_docHandles.TryGetValue(docWriter, out DocumentHandle handle)) 602private DocumentHandle AddDocument(string url, Guid language, Guid hashAlgorithm, byte[]? hash) =>
System.Reflection.Metadata (45)
System\Reflection\Metadata\Ecma335\CodedIndex.cs (1)
161/// <see cref="DocumentHandle"/>,
System\Reflection\Metadata\Ecma335\MetadataBuilder.Tables.cs (4)
1221public DocumentHandle AddDocument(BlobHandle name, GuidHandle hashAlgorithm, BlobHandle hash, GuidHandle language) 1231return DocumentHandle.FromRowId(_documentTable.Count); 1244public MethodDebugInformationHandle AddMethodDebugInformation(DocumentHandle document, BlobHandle sequencePoints) 1393/// <see cref="DocumentHandle"/>,
System\Reflection\Metadata\Ecma335\MetadataTokens.cs (2)
462public static DocumentHandle DocumentHandle(int rowNumber) 464return Metadata.DocumentHandle.FromRowId(ToRowId(rowNumber));
System\Reflection\Metadata\MetadataReader.cs (1)
1358public Document GetDocument(DocumentHandle handle)
System\Reflection\Metadata\PortablePdb\Document.cs (3)
21internal Document(MetadataReader reader, DocumentHandle handle) 30private DocumentHandle Handle => DocumentHandle.FromRowId(_rowId);
System\Reflection\Metadata\PortablePdb\HandleCollections.Debug.cs (6)
11public readonly struct DocumentHandleCollection : IReadOnlyCollection<DocumentHandle> 40IEnumerator<DocumentHandle> IEnumerable<DocumentHandle>.GetEnumerator() 50public struct Enumerator : IEnumerator<DocumentHandle>, IEnumerator 69public DocumentHandle Current 74return DocumentHandle.FromRowId((int)(_currentRowId & TokenTypeIds.RIDMask));
System\Reflection\Metadata\PortablePdb\Handles.Debug.cs (12)
10public readonly struct DocumentHandle : IEquatable<DocumentHandle> 22internal static DocumentHandle FromRowId(int rowId) 27public static implicit operator Handle(DocumentHandle handle) 32public static implicit operator EntityHandle(DocumentHandle handle) 37public static explicit operator DocumentHandle(Handle handle) 47public static explicit operator DocumentHandle(EntityHandle handle) 67public static bool operator ==(DocumentHandle left, DocumentHandle right) 74return obj is DocumentHandle documentHandle && documentHandle._rowId == _rowId; 77public bool Equals(DocumentHandle other) 87public static bool operator !=(DocumentHandle left, DocumentHandle right)
System\Reflection\Metadata\PortablePdb\MethodDebugInformation.cs (1)
41public DocumentHandle Document => _reader.MethodDebugInformationTable.GetDocument(Handle);
System\Reflection\Metadata\PortablePdb\SequencePoint.cs (3)
15public DocumentHandle Document { get; } 22internal SequencePoint(DocumentHandle document, int offset) 32internal SequencePoint(DocumentHandle document, int offset, int startLine, ushort startColumn, int endLine, ushort endColumn)
System\Reflection\Metadata\PortablePdb\SequencePointCollection.cs (6)
15private readonly DocumentHandle _document; 17internal SequencePointCollection(MemoryBlock block, DocumentHandle document) 45internal Enumerator(MemoryBlock block, DocumentHandle document) 60DocumentHandle document = _current.Document; 181private DocumentHandle ReadDocumentHandle() 189return DocumentHandle.FromRowId(rowId);
System\Reflection\Metadata\PortablePdb\Tables.Debug.cs (6)
42internal DocumentNameBlobHandle GetName(DocumentHandle handle) 48internal GuidHandle GetHashAlgorithm(DocumentHandle handle) 54internal BlobHandle GetHash(DocumentHandle handle) 60internal GuidHandle GetLanguage(DocumentHandle handle) 97internal DocumentHandle GetDocument(MethodDebugInformationHandle handle) 100return DocumentHandle.FromRowId(Block.PeekReference(rowOffset + DocumentOffset, _isDocumentRefSmall));
System.Reflection.MetadataLoadContext (1)
System\Reflection\TypeLoading\General\Ecma\MetadataExtensions.cs (1)
25public static Document GetDocument(this DocumentHandle handle, MetadataReader reader) => reader.GetDocument(handle);