38 references to DocumentKey
Microsoft.CodeAnalysis.Workspaces (38)
Classification\IRemoteSemanticClassificationService.cs (1)
51DocumentKey documentKey,
Classification\SemanticClassificationCacheUtilities.cs (2)
13public static async Task<(DocumentKey documentKey, Checksum checksum)> GetDocumentKeyAndChecksumAsync( 24var documentKey = new DocumentKey(projectKey, document.Id, document.FilePath, document.Name);
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (3)
47var documentKey = DocumentKey.ToDocumentKey(ProjectKey.ToProjectKey(solutionKey, project), document); 64DocumentKey documentKey, 175var documentKey = DocumentKey.ToDocumentKey(ProjectKey.ToProjectKey(solutionKey, project), document);
FindSymbols\SyntaxTree\SyntaxTreeIndex_Persistence.cs (1)
20IChecksummedPersistentStorageService storageService, DocumentKey documentKey, Checksum? checksum, StringTable stringTable, CancellationToken cancellationToken)
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Persistence.cs (1)
16IChecksummedPersistentStorageService storageService, DocumentKey documentKey, Checksum? checksum, StringTable stringTable, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage_DocumentIds.cs (1)
25private DocumentPrimaryKey? TryGetDocumentPrimaryKey(SqlConnection connection, DocumentKey documentKey, bool allowWrite)
Storage\SQLite\v2\SQLitePersistentStorage_DocumentSerialization.cs (5)
17protected override Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, Document? document, string name, Checksum checksum, CancellationToken cancellationToken) 20protected override Task<Stream?> ReadStreamAsync(DocumentKey documentKey, Document? document, string name, Checksum? checksum, CancellationToken cancellationToken) 23protected override Task<bool> WriteStreamAsync(DocumentKey documentKey, Document? document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 32private sealed class DocumentAccessor(SQLitePersistentStorage storage) : Accessor<DocumentKey, DocumentPrimaryKey>(Table.Document, 39protected override DocumentPrimaryKey? TryGetDatabaseKey(SqlConnection connection, DocumentKey key, bool allowWrite)
Workspace\Host\PersistentStorage\AbstractPersistentStorage.cs (9)
51protected abstract Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, Document? document, string name, Checksum checksum, CancellationToken cancellationToken); 53protected abstract Task<Stream?> ReadStreamAsync(DocumentKey documentKey, Document? document, string name, Checksum? checksum, CancellationToken cancellationToken); 55protected abstract Task<bool> WriteStreamAsync(DocumentKey documentKey, Document? document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken); 60public Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, string name, Checksum checksum, CancellationToken cancellationToken) 66public Task<Stream?> ReadStreamAsync(DocumentKey documentKey, string name, Checksum? checksum, CancellationToken cancellationToken) 72public Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 79=> IsDisabled ? SpecializedTasks.False : ChecksumMatchesAsync(DocumentKey.ToDocumentKey(document), document, name, checksum, cancellationToken); 85=> IsDisabled ? SpecializedTasks.Null<Stream>() : ReadStreamAsync(DocumentKey.ToDocumentKey(document), document, name, checksum, cancellationToken); 100=> IsDisabled ? SpecializedTasks.False : WriteStreamAsync(DocumentKey.ToDocumentKey(document), document, name, stream, checksum, cancellationToken);
Workspace\Host\PersistentStorage\DocumentKey.cs (9)
19internal readonly struct DocumentKey(ProjectKey project, DocumentId id, string? filePath, string name) : IEqualityComparer<DocumentKey>, IEquatable<DocumentKey> 33public static DocumentKey ToDocumentKey(Document document) 36public static DocumentKey ToDocumentKey(ProjectKey projectKey, TextDocumentState state) 40=> obj is DocumentKey other && Equals(other); 42public bool Equals(DocumentKey other) 48public bool Equals(DocumentKey x, DocumentKey y) 51public int GetHashCode(DocumentKey obj)
Workspace\Host\PersistentStorage\IChecksummedPersistentStorage.cs (3)
38Task<bool> ChecksumMatchesAsync(DocumentKey document, string name, Checksum checksum, CancellationToken cancellationToken = default); 62Task<Stream?> ReadStreamAsync(DocumentKey document, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 107Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\NoOpPersistentStorage.cs (3)
35public Task<bool> ChecksumMatchesAsync(DocumentKey document, string name, Checksum checksum, CancellationToken cancellationToken) 59public Task<Stream?> ReadStreamAsync(DocumentKey document, string name, Checksum? checksum, CancellationToken cancellationToken) 83public Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)