diff --git a/src/Workspaces/Core/Portable/Shared/Extensions/SemanticModelExtensions.cs b/src/Workspaces/Core/Portable/Shared/Extensions/SemanticModelExtensions.cs index 6cf1c824dc3b2f1c1ae4a775ab6abe433f7454cf..ab783bf1059bff3427d82340a3093eaf89f8434c 100644 --- a/src/Workspaces/Core/Portable/Shared/Extensions/SemanticModelExtensions.cs +++ b/src/Workspaces/Core/Portable/Shared/Extensions/SemanticModelExtensions.cs @@ -73,26 +73,6 @@ public static INamespaceSymbol GetEnclosingNamespace(this SemanticModel semantic return typeInfo.Type ?? symbolInfo.GetAnySymbol().ConvertToType(semanticModel.Compilation); } - public static TokenSemanticInfo GetSemanticInfo( - this SemanticModel semanticModel, - SyntaxToken token, - Workspace workspace, - CancellationToken cancellationToken) - { - var languageServices = workspace.Services.GetLanguageServices(token.Language); - var syntaxFacts = languageServices.GetService(); - if (!syntaxFacts.IsBindableToken(token)) - { - return TokenSemanticInfo.Empty; - } - - var semanticFacts = languageServices.GetService(); - - return GetSemanticInfo( - semanticModel, semanticFacts, syntaxFacts, - token, cancellationToken); - } - private static ISymbol MapSymbol(ISymbol symbol, ITypeSymbol type) { if (symbol.IsConstructor() && symbol.ContainingType.IsAnonymousType) @@ -141,13 +121,21 @@ private static ISymbol MapSymbol(ISymbol symbol, ITypeSymbol type) return symbol; } - private static TokenSemanticInfo GetSemanticInfo( - SemanticModel semanticModel, - ISemanticFactsService semanticFacts, - ISyntaxFactsService syntaxFacts, + public static TokenSemanticInfo GetSemanticInfo( + this SemanticModel semanticModel, SyntaxToken token, + Workspace workspace, CancellationToken cancellationToken) { + var languageServices = workspace.Services.GetLanguageServices(token.Language); + var syntaxFacts = languageServices.GetService(); + if (!syntaxFacts.IsBindableToken(token)) + { + return TokenSemanticInfo.Empty; + } + + var semanticFacts = languageServices.GetService(); + IAliasSymbol aliasSymbol; ITypeSymbol type; ITypeSymbol convertedType;