MCPcopy
hub / github.com/dotnet/vscode-csharp / TextDocumentContentProvider

Interface TextDocumentContentProvider

src/razor/src/vscodeAdapter.ts:18–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 * asked.
17 */
18export interface TextDocumentContentProvider {
19 /**
20 * An event to signal a resource has changed.
21 */
22 onDidChange?: Event<Uri>;
23
24 /**
25 * Provide textual content for a given uri.
26 *
27 * The editor will use the returned string-content to create a readonly
28 * [document](#TextDocument). Resources allocated should be released when
29 * the corresponding document has been [closed](#workspace.onDidCloseTextDocument).
30 *
31 * **Note**: The contents of the created [document](#TextDocument) might not be
32 * identical to the provided text due to end-of-line-sequence normalization.
33 *
34 * @param uri An uri which scheme matches the scheme this provider was [registered](#workspace.registerTextDocumentContentProvider) for.
35 * @param token A cancellation token.
36 * @return A string or a thenable that resolves to such.
37 */
38 provideTextDocumentContent(uri: Uri, token: CancellationToken): ProviderResult<string>;
39}
40
41/**
42 * Represents a typed event.

Callers

nothing calls this directly

Implementers 4

DefinitionMetadataDocumentProvidersrc/omnisharp/features/definitionMetad
SourceGeneratedDocumentProvidersrc/omnisharp/features/sourceGenerated
VirtualCSharpDocumentProvidertest/omnisharp/omnisharpIntegrationTes
HtmlDocumentContentProvidersrc/lsptoolshost/razor/htmlDocumentCon

Calls

no outgoing calls

Tested by

no test coverage detected