2 writes to Text
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\TextDocumentContent\TextDocumentContentHandler.cs (2)
37
return new TextDocumentContentResult {
Text
= contentText };
43
Text
= text.ToString()
33 references to Text
IdeBenchmarks (1)
Lsp\LspSourceGeneratorBenchmarks.cs (1)
134
Assert.Contains("public partial class C", sgResult.
Text
);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (32)
Diagnostics\PullDiagnosticTests.cs (5)
794
Assert.Equal("Iteration0", originalSgText.
Text
);
798
await testLspServer.OpenDocumentAsync(sourceGeneratorDocumentUri, originalSgText.
Text
);
812
Assert.Empty(newSgText.
Text
);
824
var originalText = SourceText.From(originalSgText.
Text
);
833
}, newSgText.
Text
));
Workspaces\SourceGeneratedDocumentTests.cs (27)
46
Assert.Equal("// Hello, World", result.
Text
);
61
Assert.Equal("// Hello, World", result.
Text
);
64
await testLspServer.OpenDocumentAsync(sourceGeneratorDocumentUri, result.
Text
);
83
AssertEx.NotNull(result?.
Text
);
84
await testLspServer.OpenDocumentAsync(sourceGeneratorDocumentUri, result.
Text
);
146
Assert.Equal(sourceGeneratorSource, result.
Text
);
161
Assert.Equal("// Hello, World", result.
Text
);
166
Assert.Equal("// Hello, World", secondResult.
Text
);
187
Assert.Equal("// callCount: 0", result.
Text
);
202
Assert.Equal("// callCount: 1", secondResult.
Text
);
208
Assert.Equal("// callCount: 0", secondResult.
Text
);
230
Assert.Equal("// callCount: 0", result.
Text
);
237
Assert.Equal("// callCount: 1", secondResult.
Text
);
269
Assert.Equal("// callCount: 1", refreshedResult.
Text
);
310
refreshedResult.
Text
);
367
Assert.Equal("// callCount: 0", result.
Text
);
383
Assert.Equal("// callCount: 1", secondResult.
Text
);
388
Assert.Equal("// callCount: 0", secondResult.
Text
);
448
Assert.Equal("// Hello, World", result.
Text
);
472
Assert.Equal("// Hello, World", result.
Text
);
476
await testLspServer.OpenDocumentAsync(sourceGeneratorDocumentUri, result.
Text
);
484
Assert.Empty(secondResult.
Text
);
507
Assert.Equal("// callCount: 0", result.
Text
);
521
Assert.Equal("// callCount: 1", secondResult.
Text
);
525
Assert.Equal("// callCount: 0", secondResult.
Text
);
539
Assert.Equal("// callCount: 1", thirdResult.
Text
);
559
await testLspServer.OpenDocumentAsync(sourceGeneratedDocumentUri, result.
Text
);