Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
03550308
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
03550308
编写于
7月 23, 2019
作者:
D
David Barbet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Request language specific provider from liveshare client.
上级
f7a2fef5
变更
21
显示空白变更内容
内联
并排
Showing
21 changed file
with
117 addition
and
76 deletion
+117
-76
src/Tools/ExternalAccess/LiveShare/Classification/RoslynClassificationService.Exports.cs
...are/Classification/RoslynClassificationService.Exports.cs
+8
-8
src/Tools/ExternalAccess/LiveShare/Classification/RoslynClassificationService.cs
...s/LiveShare/Classification/RoslynClassificationService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/CodeActions/RoslynCodeActionProvider.Exports.cs
...LiveShare/CodeActions/RoslynCodeActionProvider.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/CodeActions/RoslynCodeActionProvider.cs
...lAccess/LiveShare/CodeActions/RoslynCodeActionProvider.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/Completion/RoslynCompletionProvider.Exports.cs
.../LiveShare/Completion/RoslynCompletionProvider.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/Completion/RoslynCompletionProvider.cs
...alAccess/LiveShare/Completion/RoslynCompletionProvider.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/Diagnostics/RoslynRemoteDiagnosticsService.Exports.cs
...are/Diagnostics/RoslynRemoteDiagnosticsService.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/Diagnostics/RoslynRemoteDiagnosticsService.cs
...s/LiveShare/Diagnostics/RoslynRemoteDiagnosticsService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
...are/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.cs
...s/LiveShare/GotoDefinition/RoslynGotoDefinitionService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/Highlights/RoslynDocumentHighlightsService.Exports.cs
...are/Highlights/RoslynDocumentHighlightsService.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/Highlights/RoslynDocumentHighlightsService.cs
...s/LiveShare/Highlights/RoslynDocumentHighlightsService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/Navigation/RoslynNavigationBarItemService.Exports.cs
...hare/Navigation/RoslynNavigationBarItemService.Exports.cs
+6
-6
src/Tools/ExternalAccess/LiveShare/Navigation/RoslynNavigationBarItemService.cs
...ss/LiveShare/Navigation/RoslynNavigationBarItemService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/Projects/RoslynRemoteProjectInfoProvider.cs
...ess/LiveShare/Projects/RoslynRemoteProjectInfoProvider.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/References/RoslynFindUsagesService.Exports..cs
.../LiveShare/References/RoslynFindUsagesService.Exports..cs
+4
-4
src/Tools/ExternalAccess/LiveShare/References/RoslynFindUsagesService.cs
...nalAccess/LiveShare/References/RoslynFindUsagesService.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
+48
-14
src/Tools/ExternalAccess/LiveShare/SignatureHelp/RoslynSignatureHelpProvider.Exports.cs
...hare/SignatureHelp/RoslynSignatureHelpProvider.Exports.cs
+4
-4
src/Tools/ExternalAccess/LiveShare/SignatureHelp/RoslynSignatureHelpProvider.cs
...ss/LiveShare/SignatureHelp/RoslynSignatureHelpProvider.cs
+2
-2
src/Tools/ExternalAccess/LiveShare/StringConstants.cs
src/Tools/ExternalAccess/LiveShare/StringConstants.cs
+7
-0
未找到文件。
src/Tools/ExternalAccess/LiveShare/Classification/RoslynClassificationService.Exports.cs
浏览文件 @
03550308
...
@@ -30,42 +30,42 @@ public ILanguageService CreateLanguageService(HostLanguageServices languageServi
...
@@ -30,42 +30,42 @@ public ILanguageService CreateLanguageService(HostLanguageServices languageServi
[
ExportLanguageServiceFactory
(
typeof
(
ISyntaxClassificationService
),
StringConstants
.
CSharpLspLanguageName
),
Shared
]
[
ExportLanguageServiceFactory
(
typeof
(
ISyntaxClassificationService
),
StringConstants
.
CSharpLspLanguageName
),
Shared
]
internal
class
CSharpLspEditorClassificationFactoryService
:
ILanguageServiceFactory
internal
class
CSharpLspEditorClassificationFactoryService
:
ILanguageServiceFactory
{
{
private
readonly
RoslynLspClientServiceFactory
_roslyn
LspClientServiceFactory
;
private
readonly
CSharpLspClientServiceFactory
_csharp
LspClientServiceFactory
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
IThreadingContext
_threadingContext
;
private
readonly
IThreadingContext
_threadingContext
;
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspEditorClassificationFactoryService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
public
CSharpLspEditorClassificationFactoryService
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
,
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
{
{
_
roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslyn
LspClientServiceFactory
));
_
csharpLspClientServiceFactory
=
csharpLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
csharp
LspClientServiceFactory
));
_classificationTypeMap
=
classificationTypeMap
??
throw
new
ArgumentNullException
(
nameof
(
classificationTypeMap
));
_classificationTypeMap
=
classificationTypeMap
??
throw
new
ArgumentNullException
(
nameof
(
classificationTypeMap
));
_threadingContext
=
threadingContext
;
_threadingContext
=
threadingContext
;
}
}
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
languageServices
)
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
languageServices
)
{
{
return
new
RoslynClassificationService
(
_
roslyn
LspClientServiceFactory
,
languageServices
.
GetOriginalLanguageService
<
ISyntaxClassificationService
>(),
_classificationTypeMap
,
_threadingContext
);
return
new
RoslynClassificationService
(
_
csharp
LspClientServiceFactory
,
languageServices
.
GetOriginalLanguageService
<
ISyntaxClassificationService
>(),
_classificationTypeMap
,
_threadingContext
);
}
}
}
}
[
ExportLanguageServiceFactory
(
typeof
(
ISyntaxClassificationService
),
StringConstants
.
VBLspLanguageName
),
Shared
]
[
ExportLanguageServiceFactory
(
typeof
(
ISyntaxClassificationService
),
StringConstants
.
VBLspLanguageName
),
Shared
]
internal
class
VBLspEditorClassificationFactoryService
:
ILanguageServiceFactory
internal
class
VBLspEditorClassificationFactoryService
:
ILanguageServiceFactory
{
{
private
readonly
RoslynLspClientServiceFactory
_roslyn
LspClientServiceFactory
;
private
readonly
VisualBasicLspClientServiceFactory
_vb
LspClientServiceFactory
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
IThreadingContext
_threadingContext
;
private
readonly
IThreadingContext
_threadingContext
;
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspEditorClassificationFactoryService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
public
VBLspEditorClassificationFactoryService
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
,
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
{
{
_
roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslyn
LspClientServiceFactory
));
_
vbLspClientServiceFactory
=
vbLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
vb
LspClientServiceFactory
));
_classificationTypeMap
=
classificationTypeMap
??
throw
new
ArgumentNullException
(
nameof
(
classificationTypeMap
));
_classificationTypeMap
=
classificationTypeMap
??
throw
new
ArgumentNullException
(
nameof
(
classificationTypeMap
));
_threadingContext
=
threadingContext
;
_threadingContext
=
threadingContext
;
}
}
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
languageServices
)
public
ILanguageService
CreateLanguageService
(
HostLanguageServices
languageServices
)
{
{
return
new
RoslynClassificationService
(
_
roslyn
LspClientServiceFactory
,
languageServices
.
GetOriginalLanguageService
<
ISyntaxClassificationService
>(),
_classificationTypeMap
,
_threadingContext
);
return
new
RoslynClassificationService
(
_
vb
LspClientServiceFactory
,
languageServices
.
GetOriginalLanguageService
<
ISyntaxClassificationService
>(),
_classificationTypeMap
,
_threadingContext
);
}
}
}
}
}
}
src/Tools/ExternalAccess/LiveShare/Classification/RoslynClassificationService.cs
浏览文件 @
03550308
...
@@ -17,12 +17,12 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Classification
...
@@ -17,12 +17,12 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Classification
{
{
internal
class
RoslynClassificationService
:
ISyntaxClassificationService
internal
class
RoslynClassificationService
:
ISyntaxClassificationService
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
ISyntaxClassificationService
_originalService
;
private
readonly
ISyntaxClassificationService
_originalService
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
ClassificationTypeMap
_classificationTypeMap
;
private
readonly
IThreadingContext
_threadingContext
;
private
readonly
IThreadingContext
_threadingContext
;
public
RoslynClassificationService
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
,
ISyntaxClassificationService
originalService
,
public
RoslynClassificationService
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
,
ISyntaxClassificationService
originalService
,
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
ClassificationTypeMap
classificationTypeMap
,
IThreadingContext
threadingContext
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
...
...
src/Tools/ExternalAccess/LiveShare/CodeActions/RoslynCodeActionProvider.Exports.cs
浏览文件 @
03550308
...
@@ -11,8 +11,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.CodeActions
...
@@ -11,8 +11,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.CodeActions
internal
class
CSharpLspCodeActionProvider
:
RoslynCodeActionProvider
internal
class
CSharpLspCodeActionProvider
:
RoslynCodeActionProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspCodeActionProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
public
CSharpLspCodeActionProvider
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
:
base
(
roslyn
LspClientServiceFactory
,
diagnosticAnalyzerService
)
:
base
(
csharp
LspClientServiceFactory
,
diagnosticAnalyzerService
)
{
{
}
}
}
}
...
@@ -22,8 +22,8 @@ public CSharpLspCodeActionProvider(RoslynLspClientServiceFactory roslynLspClient
...
@@ -22,8 +22,8 @@ public CSharpLspCodeActionProvider(RoslynLspClientServiceFactory roslynLspClient
internal
class
VBLspCodeActionProvider
:
RoslynCodeActionProvider
internal
class
VBLspCodeActionProvider
:
RoslynCodeActionProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspCodeActionProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
public
VBLspCodeActionProvider
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
:
base
(
roslyn
LspClientServiceFactory
,
diagnosticAnalyzerService
)
:
base
(
vb
LspClientServiceFactory
,
diagnosticAnalyzerService
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/CodeActions/RoslynCodeActionProvider.cs
浏览文件 @
03550308
...
@@ -14,10 +14,10 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.CodeActions
...
@@ -14,10 +14,10 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.CodeActions
{
{
internal
class
RoslynCodeActionProvider
:
CodeRefactoringProvider
internal
class
RoslynCodeActionProvider
:
CodeRefactoringProvider
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
IDiagnosticAnalyzerService
_diagnosticAnalyzerService
;
private
readonly
IDiagnosticAnalyzerService
_diagnosticAnalyzerService
;
public
RoslynCodeActionProvider
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
public
RoslynCodeActionProvider
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
,
IDiagnosticAnalyzerService
diagnosticAnalyzerService
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_diagnosticAnalyzerService
=
diagnosticAnalyzerService
??
throw
new
ArgumentNullException
(
nameof
(
diagnosticAnalyzerService
));
_diagnosticAnalyzerService
=
diagnosticAnalyzerService
??
throw
new
ArgumentNullException
(
nameof
(
diagnosticAnalyzerService
));
...
...
src/Tools/ExternalAccess/LiveShare/Completion/RoslynCompletionProvider.Exports.cs
浏览文件 @
03550308
...
@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Completion
...
@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Completion
internal
class
CSharpLspCompletionProvider
:
RoslynCompletionProvider
internal
class
CSharpLspCompletionProvider
:
RoslynCompletionProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspCompletionProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
CSharpLspCompletionProvider
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
csharp
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -19,8 +19,8 @@ public CSharpLspCompletionProvider(RoslynLspClientServiceFactory roslynLspClient
...
@@ -19,8 +19,8 @@ public CSharpLspCompletionProvider(RoslynLspClientServiceFactory roslynLspClient
internal
class
VBLspCompletionProvider
:
RoslynCompletionProvider
internal
class
VBLspCompletionProvider
:
RoslynCompletionProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspCompletionProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
VBLspCompletionProvider
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
vb
LspClientServiceFactory
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Completion/RoslynCompletionProvider.cs
浏览文件 @
03550308
...
@@ -16,9 +16,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Completion
...
@@ -16,9 +16,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Completion
{
{
internal
class
RoslynCompletionProvider
:
CommonCompletionProvider
internal
class
RoslynCompletionProvider
:
CommonCompletionProvider
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
public
RoslynCompletionProvider
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
)
public
RoslynCompletionProvider
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Diagnostics/RoslynRemoteDiagnosticsService.Exports.cs
浏览文件 @
03550308
...
@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Diagnostics
...
@@ -9,8 +9,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Diagnostics
internal
class
CSharpLspRemoteDiagnosticsService
:
RoslynRemoteDiagnosticsService
internal
class
CSharpLspRemoteDiagnosticsService
:
RoslynRemoteDiagnosticsService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspRemoteDiagnosticsService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
CSharpLspRemoteDiagnosticsService
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
csharp
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -19,8 +19,8 @@ public CSharpLspRemoteDiagnosticsService(RoslynLspClientServiceFactory roslynLsp
...
@@ -19,8 +19,8 @@ public CSharpLspRemoteDiagnosticsService(RoslynLspClientServiceFactory roslynLsp
internal
class
VBLspRemoteDiagnosticsService
:
RoslynRemoteDiagnosticsService
internal
class
VBLspRemoteDiagnosticsService
:
RoslynRemoteDiagnosticsService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspRemoteDiagnosticsService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
VBLspRemoteDiagnosticsService
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
vb
LspClientServiceFactory
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Diagnostics/RoslynRemoteDiagnosticsService.cs
浏览文件 @
03550308
...
@@ -13,9 +13,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Diagnostics
...
@@ -13,9 +13,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Diagnostics
{
{
internal
class
RoslynRemoteDiagnosticsService
:
IRemoteDiagnosticsService
internal
class
RoslynRemoteDiagnosticsService
:
IRemoteDiagnosticsService
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
public
RoslynRemoteDiagnosticsService
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
)
public
RoslynRemoteDiagnosticsService
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
}
}
...
...
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
浏览文件 @
03550308
...
@@ -13,17 +13,17 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.GotoDefinition
...
@@ -13,17 +13,17 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.GotoDefinition
internal
class
CSharpLspGotoDefinitionService
:
RoslynGotoDefinitionService
internal
class
CSharpLspGotoDefinitionService
:
RoslynGotoDefinitionService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
public
CSharpLspGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
:
base
(
streamingPresenter
,
roslyn
LspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
:
base
(
streamingPresenter
,
csharp
LspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
}
}
[
ExportLanguageService
(
typeof
(
IGoToDefinitionService
),
StringConstants
.
VBLspLanguageName
),
Shared
]
[
ExportLanguageService
(
typeof
(
IGoToDefinitionService
),
StringConstants
.
VBLspLanguageName
),
Shared
]
internal
class
VBLspGotoDefinitionService
:
RoslynGotoDefinitionService
internal
class
VBLspGotoDefinitionService
:
RoslynGotoDefinitionService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
public
VBLspGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
:
base
(
streamingPresenter
,
roslyn
LspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
:
base
(
streamingPresenter
,
vb
LspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
}
}
}
}
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.cs
浏览文件 @
03550308
...
@@ -21,13 +21,13 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.GotoDefinition
...
@@ -21,13 +21,13 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.GotoDefinition
internal
class
RoslynGotoDefinitionService
:
IGoToDefinitionService
internal
class
RoslynGotoDefinitionService
:
IGoToDefinitionService
{
{
private
readonly
IStreamingFindUsagesPresenter
_streamingPresenter
;
private
readonly
IStreamingFindUsagesPresenter
_streamingPresenter
;
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteWorkspace
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteWorkspace
;
private
readonly
IThreadingContext
_threadingContext
;
private
readonly
IThreadingContext
_threadingContext
;
public
RoslynGotoDefinitionService
(
public
RoslynGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
IStreamingFindUsagesPresenter
streamingPresenter
,
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
,
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteWorkspace
,
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
IThreadingContext
threadingContext
)
{
{
...
...
src/Tools/ExternalAccess/LiveShare/Highlights/RoslynDocumentHighlightsService.Exports.cs
浏览文件 @
03550308
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Highlights
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Highlights
internal
class
CSharpLspDocumentHighlightsService
:
RoslynDocumentHighlightsService
internal
class
CSharpLspDocumentHighlightsService
:
RoslynDocumentHighlightsService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspDocumentHighlightsService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
CSharpLspDocumentHighlightsService
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
csharp
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -20,8 +20,8 @@ public CSharpLspDocumentHighlightsService(RoslynLspClientServiceFactory roslynLs
...
@@ -20,8 +20,8 @@ public CSharpLspDocumentHighlightsService(RoslynLspClientServiceFactory roslynLs
internal
class
VBLspDocumentHighlightsService
:
RoslynDocumentHighlightsService
internal
class
VBLspDocumentHighlightsService
:
RoslynDocumentHighlightsService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspDocumentHighlightsService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
VBLspDocumentHighlightsService
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
vb
LspClientServiceFactory
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Highlights/RoslynDocumentHighlightsService.cs
浏览文件 @
03550308
...
@@ -13,9 +13,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Highlights
...
@@ -13,9 +13,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Highlights
{
{
internal
class
RoslynDocumentHighlightsService
:
IDocumentHighlightsService
internal
class
RoslynDocumentHighlightsService
:
IDocumentHighlightsService
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
public
RoslynDocumentHighlightsService
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
)
public
RoslynDocumentHighlightsService
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Navigation/RoslynNavigationBarItemService.Exports.cs
浏览文件 @
03550308
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Navigation
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Navigation
internal
class
CSharpLspNavigationBarItemService
:
RoslynNavigationBarItemService
internal
class
CSharpLspNavigationBarItemService
:
RoslynNavigationBarItemService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
protected
CSharpLspNavigationBarItemService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
protected
CSharpLspNavigationBarItemService
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
csharp
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -20,8 +20,8 @@ protected CSharpLspNavigationBarItemService(RoslynLspClientServiceFactory roslyn
...
@@ -20,8 +20,8 @@ protected CSharpLspNavigationBarItemService(RoslynLspClientServiceFactory roslyn
internal
class
VBLspNavigationBarItemService
:
RoslynNavigationBarItemService
internal
class
VBLspNavigationBarItemService
:
RoslynNavigationBarItemService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
protected
VBLspNavigationBarItemService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
protected
VBLspNavigationBarItemService
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
vb
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -30,8 +30,8 @@ protected VBLspNavigationBarItemService(RoslynLspClientServiceFactory roslynLspC
...
@@ -30,8 +30,8 @@ protected VBLspNavigationBarItemService(RoslynLspClientServiceFactory roslynLspC
internal
class
TypeScriptLspNavigationBarItemService
:
RoslynNavigationBarItemService
internal
class
TypeScriptLspNavigationBarItemService
:
RoslynNavigationBarItemService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
protected
TypeScriptLspNavigationBarItemService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
protected
TypeScriptLspNavigationBarItemService
(
TypeScriptLspClientServiceFactory
typeScript
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
typeScript
LspClientServiceFactory
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Navigation/RoslynNavigationBarItemService.cs
浏览文件 @
03550308
...
@@ -20,9 +20,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Navigation
...
@@ -20,9 +20,9 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.Navigation
{
{
internal
class
RoslynNavigationBarItemService
:
AbstractNavigationBarItemService
internal
class
RoslynNavigationBarItemService
:
AbstractNavigationBarItemService
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
internal
RoslynNavigationBarItemService
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
)
internal
RoslynNavigationBarItemService
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
}
}
...
...
src/Tools/ExternalAccess/LiveShare/Projects/RoslynRemoteProjectInfoProvider.cs
浏览文件 @
03550308
...
@@ -17,11 +17,11 @@ internal class RoslynRemoteProjectInfoProvider : IRemoteProjectInfoProvider
...
@@ -17,11 +17,11 @@ internal class RoslynRemoteProjectInfoProvider : IRemoteProjectInfoProvider
{
{
private
const
string
SystemUriSchemeExternal
=
"vslsexternal"
;
private
const
string
SystemUriSchemeExternal
=
"vslsexternal"
;
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
CSharp
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteLanguageServiceWorkspace
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteLanguageServiceWorkspace
;
[
ImportingConstructor
]
[
ImportingConstructor
]
public
RoslynRemoteProjectInfoProvider
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
public
RoslynRemoteProjectInfoProvider
(
CSharp
LspClientServiceFactory
roslynLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_remoteLanguageServiceWorkspace
=
remoteLanguageServiceWorkspace
??
throw
new
ArgumentNullException
(
nameof
(
RemoteLanguageServiceWorkspace
));
_remoteLanguageServiceWorkspace
=
remoteLanguageServiceWorkspace
??
throw
new
ArgumentNullException
(
nameof
(
RemoteLanguageServiceWorkspace
));
...
...
src/Tools/ExternalAccess/LiveShare/References/RoslynFindUsagesService.Exports..cs
浏览文件 @
03550308
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.References
...
@@ -10,8 +10,8 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.References
internal
class
CSharpLspFindUsagesService
:
RoslynFindUsagesService
internal
class
CSharpLspFindUsagesService
:
RoslynFindUsagesService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspFindUsagesService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
public
CSharpLspFindUsagesService
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
:
base
(
roslyn
LspClientServiceFactory
,
remoteLanguageServiceWorkspace
)
:
base
(
csharp
LspClientServiceFactory
,
remoteLanguageServiceWorkspace
)
{
{
}
}
}
}
...
@@ -20,8 +20,8 @@ public CSharpLspFindUsagesService(RoslynLspClientServiceFactory roslynLspClientS
...
@@ -20,8 +20,8 @@ public CSharpLspFindUsagesService(RoslynLspClientServiceFactory roslynLspClientS
internal
class
VBLspFindUsagesService
:
RoslynFindUsagesService
internal
class
VBLspFindUsagesService
:
RoslynFindUsagesService
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspFindUsagesService
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
public
VBLspFindUsagesService
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
:
base
(
roslyn
LspClientServiceFactory
,
remoteLanguageServiceWorkspace
)
:
base
(
vb
LspClientServiceFactory
,
remoteLanguageServiceWorkspace
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/References/RoslynFindUsagesService.cs
浏览文件 @
03550308
...
@@ -14,10 +14,10 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.References
...
@@ -14,10 +14,10 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.LiveShare.References
{
{
internal
class
RoslynFindUsagesService
:
IFindUsagesService
internal
class
RoslynFindUsagesService
:
IFindUsagesService
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteLanguageServiceWorkspace
;
private
readonly
RemoteLanguageServiceWorkspace
_remoteLanguageServiceWorkspace
;
public
RoslynFindUsagesService
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
public
RoslynFindUsagesService
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteLanguageServiceWorkspace
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_remoteLanguageServiceWorkspace
=
remoteLanguageServiceWorkspace
??
throw
new
ArgumentNullException
(
nameof
(
remoteLanguageServiceWorkspace
));
_remoteLanguageServiceWorkspace
=
remoteLanguageServiceWorkspace
??
throw
new
ArgumentNullException
(
nameof
(
remoteLanguageServiceWorkspace
));
...
...
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
浏览文件 @
03550308
...
@@ -11,16 +11,9 @@
...
@@ -11,16 +11,9 @@
namespace
Microsoft.CodeAnalysis.ExternalAccess.LiveShare
namespace
Microsoft.CodeAnalysis.ExternalAccess.LiveShare
{
{
[
Export
]
internal
abstract
class
AbstractLspClientServiceFactory
:
ICollaborationServiceFactory
[
ExportCollaborationService
(
typeof
(
RoslynLSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
CreationPriority
=
(
int
)
ServiceRole
.
LocalService
+
2000
)]
internal
class
RoslynLspClientServiceFactory
:
ICollaborationServiceFactory
{
{
private
const
string
RoslynProviderName
=
"Roslyn"
;
protected
abstract
string
LanguageSpecificProviderName
{
get
;
}
private
const
string
AnyProviderName
=
"any"
;
public
ILanguageServerClient
ActiveLanguageServerClient
{
get
;
private
set
;
}
public
ILanguageServerClient
ActiveLanguageServerClient
{
get
;
private
set
;
}
...
@@ -30,11 +23,19 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
...
@@ -30,11 +23,19 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
collaborationSession
.
RemoteServicesChanged
+=
(
sender
,
e
)
=>
collaborationSession
.
RemoteServicesChanged
+=
(
sender
,
e
)
=>
{
{
// VS will expose a roslyn LSP server and VSCode will expose a "any" LSP provider and both support roslyn languages.
// VS will expose a roslyn LSP server.
var
roslynLspServerProviderName
=
LanguageServicesUtils
.
GetLanguageServerProviderServiceName
(
RoslynProviderName
);
var
roslynLspServerProviderName
=
LanguageServicesUtils
.
GetLanguageServerProviderServiceName
(
StringConstants
.
RoslynProviderName
);
var
anyLspServerProviderName
=
LanguageServicesUtils
.
GetLanguageServerProviderServiceName
(
AnyProviderName
);
// Newer versions of VS will expose language specific LSP servers for Roslyn.
var
languageSpecificLspServerProviderName
=
LanguageServicesUtils
.
GetLanguageServerProviderServiceName
(
LanguageSpecificProviderName
);
// VSCode will expose a "any" LSP provider and both support roslyn languages.
var
anyLspServerProviderName
=
LanguageServicesUtils
.
GetLanguageServerProviderServiceName
(
StringConstants
.
AnyProviderName
);
if
(
collaborationSession
.
RemoteServiceNames
.
Contains
(
roslynLspServerProviderName
))
// For VS, Preferentially use the language specific server when it's available, otherwise fall back to the generic roslyn server.
if
(
collaborationSession
.
RemoteServiceNames
.
Contains
(
languageSpecificLspServerProviderName
))
{
ActiveLanguageServerClient
=
languageServerGuestService
.
CreateLanguageServerClient
(
languageSpecificLspServerProviderName
);
}
else
if
(
collaborationSession
.
RemoteServiceNames
.
Contains
(
roslynLspServerProviderName
))
{
{
ActiveLanguageServerClient
=
languageServerGuestService
.
CreateLanguageServerClient
(
roslynLspServerProviderName
);
ActiveLanguageServerClient
=
languageServerGuestService
.
CreateLanguageServerClient
(
roslynLspServerProviderName
);
}
}
...
@@ -112,7 +113,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
...
@@ -112,7 +113,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
return
Task
.
FromResult
<
ICollaborationService
>(
lifeTimeService
);
return
Task
.
FromResult
<
ICollaborationService
>(
lifeTimeService
);
}
}
pr
ivate
class
RoslynLSPClientLifeTimeService
:
ICollaborationService
,
IDisposable
pr
otected
class
RoslynLSPClientLifeTimeService
:
ICollaborationService
,
IDisposable
{
{
public
event
EventHandler
Disposed
;
public
event
EventHandler
Disposed
;
...
@@ -122,4 +123,37 @@ public void Dispose()
...
@@ -122,4 +123,37 @@ public void Dispose()
}
}
}
}
}
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
RoslynLSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
CreationPriority
=
(
int
)
ServiceRole
.
LocalService
+
2000
)]
internal
class
CSharpLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
CSharpProviderName
;
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
RoslynLSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
CreationPriority
=
(
int
)
ServiceRole
.
LocalService
+
2000
)]
internal
class
VisualBasicLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
VisualBasicProviderName
;
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
RoslynLSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
CreationPriority
=
(
int
)
ServiceRole
.
LocalService
+
2000
)]
internal
class
TypeScriptLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
TypeScriptProviderName
;
}
}
}
src/Tools/ExternalAccess/LiveShare/SignatureHelp/RoslynSignatureHelpProvider.Exports.cs
浏览文件 @
03550308
...
@@ -11,8 +11,8 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client
...
@@ -11,8 +11,8 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client
internal
class
CSharpLspSignatureHelpProvider
:
RoslynSignatureHelpProvider
internal
class
CSharpLspSignatureHelpProvider
:
RoslynSignatureHelpProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
CSharpLspSignatureHelpProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
CSharpLspSignatureHelpProvider
(
CSharpLspClientServiceFactory
csharp
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
csharp
LspClientServiceFactory
)
{
{
}
}
}
}
...
@@ -22,8 +22,8 @@ public CSharpLspSignatureHelpProvider(RoslynLspClientServiceFactory roslynLspCli
...
@@ -22,8 +22,8 @@ public CSharpLspSignatureHelpProvider(RoslynLspClientServiceFactory roslynLspCli
internal
class
VBLspSignatureHelpProvider
:
RoslynSignatureHelpProvider
internal
class
VBLspSignatureHelpProvider
:
RoslynSignatureHelpProvider
{
{
[
ImportingConstructor
]
[
ImportingConstructor
]
public
VBLspSignatureHelpProvider
(
RoslynLspClientServiceFactory
roslyn
LspClientServiceFactory
)
public
VBLspSignatureHelpProvider
(
VisualBasicLspClientServiceFactory
vb
LspClientServiceFactory
)
:
base
(
roslyn
LspClientServiceFactory
)
:
base
(
vb
LspClientServiceFactory
)
{
{
}
}
}
}
...
...
src/Tools/ExternalAccess/LiveShare/SignatureHelp/RoslynSignatureHelpProvider.cs
浏览文件 @
03550308
...
@@ -16,9 +16,9 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client
...
@@ -16,9 +16,9 @@ namespace Microsoft.VisualStudio.LanguageServices.LiveShare.Client
{
{
class
RoslynSignatureHelpProvider
:
ISignatureHelpProvider
class
RoslynSignatureHelpProvider
:
ISignatureHelpProvider
{
{
private
readonly
Roslyn
LspClientServiceFactory
_roslynLspClientServiceFactory
;
private
readonly
Abstract
LspClientServiceFactory
_roslynLspClientServiceFactory
;
public
RoslynSignatureHelpProvider
(
Roslyn
LspClientServiceFactory
roslynLspClientServiceFactory
)
public
RoslynSignatureHelpProvider
(
Abstract
LspClientServiceFactory
roslynLspClientServiceFactory
)
{
{
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
_roslynLspClientServiceFactory
=
roslynLspClientServiceFactory
??
throw
new
ArgumentNullException
(
nameof
(
roslynLspClientServiceFactory
));
}
}
...
...
src/Tools/ExternalAccess/LiveShare/StringConstants.cs
浏览文件 @
03550308
...
@@ -11,6 +11,13 @@ internal class StringConstants
...
@@ -11,6 +11,13 @@ internal class StringConstants
// The service name for an LSP server implemented using Roslyn designed to be used with the LSP SDK client
// The service name for an LSP server implemented using Roslyn designed to be used with the LSP SDK client
public
const
string
RoslynLspSdkContractName
=
"RoslynLSPSDK"
;
public
const
string
RoslynLspSdkContractName
=
"RoslynLSPSDK"
;
// LSP server provider names.
public
const
string
RoslynProviderName
=
"Roslyn"
;
public
const
string
CSharpProviderName
=
"RoslynCSharp"
;
public
const
string
VisualBasicProviderName
=
"RoslynVisualBasic"
;
public
const
string
TypeScriptProviderName
=
"RoslynTypeScript"
;
public
const
string
AnyProviderName
=
"any"
;
public
const
string
CSharpLspLanguageName
=
"C#_LSP"
;
public
const
string
CSharpLspLanguageName
=
"C#_LSP"
;
public
const
string
CSharpLspContentTypeName
=
"C#_LSP"
;
public
const
string
CSharpLspContentTypeName
=
"C#_LSP"
;
public
const
string
TypeScriptLanguageName
=
"TypeScript"
;
public
const
string
TypeScriptLanguageName
=
"TypeScript"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录