Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Feb 13, 2022
1 parent 34600ea commit fc093a1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ internal sealed class CSharpGoToSymbolService : AbstractGoToSymbolService
{
[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public CSharpGoToSymbolService(IThreadingContext threadingContext, IGlobalOptionService globalOptions)
: base(threadingContext, globalOptions)
public CSharpGoToSymbolService(IThreadingContext threadingContext)
: base(threadingContext)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
// See the LICENSE file in the project root for more information.

using Microsoft.CodeAnalysis.Options;
using System;
using Microsoft.CodeAnalysis.Classification;

namespace Microsoft.CodeAnalysis.FindUsages
{
internal static class FindUsagesOptionsStorage
{
public static FindUsagesOptions GetFindUsagesOptions(this IGlobalOptionService globalOptions, string language)
=> globalOptions.GetFindUsagesOptions(language);
=> new(ClassificationOptions: globalOptions.GetClassificationOptions(language));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Microsoft.CodeAnalysis.Editor.GoToDefinition
// Ctrl+Click (GoToSymbol)
internal abstract class AbstractGoToSymbolService : ForegroundThreadAffinitizedObject, IGoToSymbolService
{
protected AbstractGoToSymbolService(IThreadingContext threadingContext, IGlobalOptionService globalOptions, bool assertIsForeground = false)
protected AbstractGoToSymbolService(IThreadingContext threadingContext, bool assertIsForeground = false)
: base(threadingContext, assertIsForeground)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.GoToDefinition

<ImportingConstructor>
<Obsolete(MefConstruction.ImportingConstructorMessage, True)>
Public Sub New(threadingContext As IThreadingContext, globalOptions As IGlobalOptionService)
MyBase.New(threadingContext, globalOptions)
Public Sub New(threadingContext As IThreadingContext)
MyBase.New(threadingContext)
End Sub
End Class
End Namespace
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public static async ValueTask<DefinitionItem> ToClassifiedDefinitionItemAsync(
CancellationToken cancellationToken)
{
var unclassifiedSpans = TryGetSourceLocations(definition, solution, definition.Locations, includeHiddenLocations);
var classifiedSpans = await ClassifyDocumentSpansAsync(context, unclassifiedSpans, cancellationToken).ConfigureAwait(false);
var classifiedSpans = unclassifiedSpans.IsDefault ? default : await ClassifyDocumentSpansAsync(context, unclassifiedSpans, cancellationToken).ConfigureAwait(false);

return ToDefinitionItem(definition, classifiedSpans, solution, options, isPrimary);
}
Expand All @@ -100,7 +100,7 @@ public static async ValueTask<DefinitionItem> ToClassifiedDefinitionItemAsync(

var allLocations = group.Symbols.SelectMany(s => s.Locations).ToImmutableArray();
var unclassifiedSpans = TryGetSourceLocations(definition, solution, allLocations, includeHiddenLocations);
var classifiedSpans = await ClassifyDocumentSpansAsync(context, unclassifiedSpans, cancellationToken).ConfigureAwait(false);
var classifiedSpans = unclassifiedSpans.IsDefault ? default : await ClassifyDocumentSpansAsync(context, unclassifiedSpans, cancellationToken).ConfigureAwait(false);

return ToDefinitionItem(definition, classifiedSpans, solution, options, isPrimary);
}
Expand Down

0 comments on commit fc093a1

Please sign in to comment.