12
12
using Microsoft . CodeAnalysis ;
13
13
using Microsoft . CodeAnalysis . CodeLens ;
14
14
using Microsoft . CodeAnalysis . Editor ;
15
+ using Microsoft . CodeAnalysis . Editor . Wpf ;
15
16
using Microsoft . CodeAnalysis . Host . Mef ;
16
- using Microsoft . CodeAnalysis . LanguageServer ;
17
17
using Microsoft . VisualStudio . Core . Imaging ;
18
18
using Microsoft . VisualStudio . Language . CodeLens ;
19
19
using Microsoft . VisualStudio . Language . CodeLens . Remoting ;
@@ -104,7 +104,7 @@ private async Task PollForUpdatesAsync()
104
104
105
105
var projectVersions = await _lazyCodeLensCallbackService . Value . InvokeAsync < ImmutableDictionary < Guid , string > > (
106
106
this ,
107
- " GetProjectVersionsAsync" ,
107
+ nameof ( ICodeLensContext . GetProjectVersionsAsync ) ,
108
108
[ keys ] ,
109
109
_cancellationTokenSource . Token ) . ConfigureAwait ( false ) ;
110
110
@@ -200,7 +200,7 @@ public void Dispose()
200
200
// raw data from Roslyn OOP such as razor find all reference results
201
201
var referenceCountOpt = await _callbackService . InvokeAsync < ReferenceCount ? > (
202
202
_owner ,
203
- " GetReferenceCountAsync" ,
203
+ nameof ( ICodeLensContext . GetReferenceCountAsync ) ,
204
204
[ Descriptor , descriptorContext , _calculatedReferenceCount ] ,
205
205
cancellationToken ) . ConfigureAwait ( false ) ;
206
206
@@ -243,7 +243,7 @@ public async Task<CodeLensDetailsDescriptor> GetDetailsAsync(CodeLensDescriptorC
243
243
// raw data from Roslyn OOP such as razor find all reference results
244
244
var referenceLocationDescriptors = await _callbackService . InvokeAsync < ( string projectVersion , ImmutableArray < ReferenceLocationDescriptor > references ) ? > (
245
245
_owner ,
246
- " FindReferenceLocationsAsync" ,
246
+ nameof ( ICodeLensContext . FindReferenceLocationsAsync ) ,
247
247
[ Descriptor , descriptorContext ] ,
248
248
cancellationToken ) . ConfigureAwait ( false ) ;
249
249
@@ -263,8 +263,8 @@ public async Task<CodeLensDetailsDescriptor> GetDetailsAsync(CodeLensDescriptorC
263
263
ImageId imageId = default ;
264
264
if ( referenceLocationDescriptor . Glyph . HasValue )
265
265
{
266
- var imageData = referenceLocationDescriptor . Glyph . Value . GetVsImageData ( ) ;
267
- imageId = new ImageId ( imageData . guid , imageData . id ) ;
266
+ var moniker = referenceLocationDescriptor . Glyph . Value . GetImageMoniker ( ) ;
267
+ imageId = new ImageId ( moniker . Guid , moniker . Id ) ;
268
268
}
269
269
270
270
return new CodeLensDetailEntryDescriptor ( )
0 commit comments