@@ -38,11 +38,6 @@ public async Task WaitForLSPServerDeactivatedAsync(CancellationToken cancellatio
38
38
39
39
private async Task WaitForLSPServerActivationStatusAsync ( bool active , CancellationToken cancellationToken )
40
40
{
41
- if ( await IsCohostingActiveAsync ( cancellationToken ) )
42
- {
43
- return ;
44
- }
45
-
46
41
var tracker = await TestServices . Shell . GetComponentModelServiceAsync < ILspServerActivationTracker > ( cancellationToken ) ;
47
42
await Helper . RetryAsync ( ct =>
48
43
{
@@ -126,25 +121,19 @@ public async Task<ImmutableArray<string>> GetProjectKeyIdsForProjectAsync(string
126
121
return projectManager . GetProjectKeysWithFilePath ( projectFilePath ) . SelectAsArray ( static key => key . Id ) ;
127
122
}
128
123
129
- public async Task WaitForCSharpVirtualDocumentAsync ( string razorFilePath , CancellationToken cancellationToken )
124
+ public async Task WaitForHtmlVirtualDocumentAsync ( string razorFilePath , CancellationToken cancellationToken )
130
125
{
131
- if ( await IsCohostingActiveAsync ( cancellationToken ) )
132
- {
133
- return ;
134
- }
135
-
136
126
var documentManager = await TestServices . Shell . GetComponentModelServiceAsync < LSPDocumentManager > ( cancellationToken ) ;
137
127
138
128
var uri = new Uri ( razorFilePath , UriKind . Absolute ) ;
139
129
await Helper . RetryAsync ( ct =>
140
130
{
141
131
if ( documentManager . TryGetDocument ( uri , out var snapshot ) )
142
132
{
143
- if ( snapshot . TryGetVirtualDocument < CSharpVirtualDocumentSnapshot > ( out var virtualDocument ) )
133
+ if ( snapshot . TryGetVirtualDocument < HtmlVirtualDocumentSnapshot > ( out var virtualDocument ) )
144
134
{
145
- var result = ! virtualDocument . ProjectKey . IsUnknown &&
146
- virtualDocument . Snapshot . Length > 0 ;
147
- return Task . FromResult ( result ) ;
135
+ //var result = virtualDocument.Snapshot.Length > 0;
136
+ return Task . FromResult ( true ) ;
148
137
}
149
138
}
150
139
@@ -153,15 +142,8 @@ await Helper.RetryAsync(ct =>
153
142
} , TimeSpan . FromMilliseconds ( 100 ) , cancellationToken ) ;
154
143
}
155
144
156
- public async Task WaitForCSharpVirtualDocumentUpdateAsync ( string projectName , string relativeFilePath , Func < Task > updater , CancellationToken cancellationToken )
145
+ public async Task WaitForHtmlVirtualDocumentUpdateAsync ( string projectName , string relativeFilePath , Func < Task > updater , CancellationToken cancellationToken )
157
146
{
158
- if ( await IsCohostingActiveAsync ( cancellationToken ) )
159
- {
160
- // In cohosting we don't wait for anything, we just update the Razor doc and assume that Roslyn will do the right things
161
- await updater ( ) ;
162
- return ;
163
- }
164
-
165
147
var filePath = await TestServices . SolutionExplorer . GetAbsolutePathForProjectRelativeFilePathAsync ( projectName , relativeFilePath , cancellationToken ) ;
166
148
167
149
var documentManager = await TestServices . Shell . GetComponentModelServiceAsync < LSPDocumentManager > ( cancellationToken ) ;
@@ -174,10 +156,9 @@ await Helper.RetryAsync(async ct =>
174
156
{
175
157
if ( documentManager . TryGetDocument ( uri , out var snapshot ) )
176
158
{
177
- if ( snapshot . TryGetVirtualDocument < CSharpVirtualDocumentSnapshot > ( out var virtualDocument ) )
159
+ if ( snapshot . TryGetVirtualDocument < HtmlVirtualDocumentSnapshot > ( out var virtualDocument ) )
178
160
{
179
- if ( ! virtualDocument . ProjectKey . IsUnknown &&
180
- virtualDocument . Snapshot . Length > 0 )
161
+ if ( virtualDocument . Snapshot . Length > 0 )
181
162
{
182
163
if ( desiredVersion is null )
183
164
{
0 commit comments