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