Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
38730bd2
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,发现更多精彩内容 >>
未验证
提交
38730bd2
编写于
7月 31, 2019
作者:
D
David
提交者:
GitHub
7月 31, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #37607 from dibarbet/ts_gotodef
Add back typescript gotodef on the client.
上级
cc25638a
b3a39bef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
5 deletion
+36
-5
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
...are/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
+11
-0
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
+25
-5
未找到文件。
src/Tools/ExternalAccess/LiveShare/GotoDefinition/RoslynGotoDefinitionService.Exports.cs
浏览文件 @
38730bd2
...
...
@@ -26,4 +26,15 @@ internal class VBLspGotoDefinitionService : RoslynGotoDefinitionService
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
:
base
(
streamingPresenter
,
vbLspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
}
[
ExportLanguageService
(
typeof
(
IGoToDefinitionService
),
StringConstants
.
TypeScriptLanguageName
,
WorkspaceKind
.
AnyCodeRoslynWorkspace
),
Shared
]
internal
class
TypeScriptLspGotoDefinitionService
:
RoslynGotoDefinitionService
{
[
ImportingConstructor
]
public
TypeScriptLspGotoDefinitionService
(
IStreamingFindUsagesPresenter
streamingPresenter
,
TypeScriptLspClientServiceFactory
typeScriptLspClientServiceFactory
,
RemoteLanguageServiceWorkspace
remoteWorkspace
,
IThreadingContext
threadingContext
)
:
base
(
streamingPresenter
,
typeScriptLspClientServiceFactory
,
remoteWorkspace
,
threadingContext
)
{
}
}
}
src/Tools/ExternalAccess/LiveShare/RoslynLSPClientService.cs
浏览文件 @
38730bd2
...
...
@@ -16,6 +16,8 @@ internal abstract class AbstractLspClientServiceFactory : ICollaborationServiceF
{
protected
abstract
string
LanguageSpecificProviderName
{
get
;
}
protected
abstract
RoslynLSPClientLifeTimeService
LspClientLifeTimeService
{
get
;
}
public
ILanguageServerClient
ActiveLanguageServerClient
{
get
;
private
set
;
}
public
Task
<
ICollaborationService
>
CreateServiceAsync
(
CollaborationSession
collaborationSession
,
CancellationToken
cancellationToken
)
...
...
@@ -104,7 +106,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
TextDocumentSync
=
null
,
})));
var
lifeTimeService
=
new
RoslynLSPClientLifeTimeService
()
;
var
lifeTimeService
=
LspClientLifeTimeService
;
lifeTimeService
.
Disposed
+=
(
s
,
e
)
=>
{
ActiveLanguageServerClient
?.
Dispose
();
...
...
@@ -114,7 +116,7 @@ public Task<ICollaborationService> CreateServiceAsync(CollaborationSession colla
return
Task
.
FromResult
<
ICollaborationService
>(
lifeTimeService
);
}
protected
class
RoslynLSPClientLifeTimeService
:
ICollaborationService
,
IDisposable
protected
abstract
class
RoslynLSPClientLifeTimeService
:
ICollaborationService
,
IDisposable
{
public
event
EventHandler
Disposed
;
...
...
@@ -126,7 +128,7 @@ public void Dispose()
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
Roslyn
LSPClientLifeTimeService
),
[
ExportCollaborationService
(
typeof
(
CSharp
LSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
...
...
@@ -134,10 +136,16 @@ public void Dispose()
internal
class
CSharpLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
CSharpProviderName
;
protected
override
RoslynLSPClientLifeTimeService
LspClientLifeTimeService
=>
new
CSharpLSPClientLifeTimeService
();
private
class
CSharpLSPClientLifeTimeService
:
RoslynLSPClientLifeTimeService
{
}
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
Roslyn
LSPClientLifeTimeService
),
[
ExportCollaborationService
(
typeof
(
VisualBasic
LSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
...
...
@@ -145,10 +153,16 @@ internal class CSharpLspClientServiceFactory : AbstractLspClientServiceFactory
internal
class
VisualBasicLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
VisualBasicProviderName
;
protected
override
RoslynLSPClientLifeTimeService
LspClientLifeTimeService
=>
new
VisualBasicLSPClientLifeTimeService
();
private
class
VisualBasicLSPClientLifeTimeService
:
RoslynLSPClientLifeTimeService
{
}
}
[
Export
]
[
ExportCollaborationService
(
typeof
(
Roslyn
LSPClientLifeTimeService
),
[
ExportCollaborationService
(
typeof
(
TypeScript
LSPClientLifeTimeService
),
Scope
=
SessionScope
.
Guest
,
Role
=
ServiceRole
.
LocalService
,
Features
=
"LspServices"
,
...
...
@@ -156,5 +170,11 @@ internal class VisualBasicLspClientServiceFactory : AbstractLspClientServiceFact
internal
class
TypeScriptLspClientServiceFactory
:
AbstractLspClientServiceFactory
{
protected
override
string
LanguageSpecificProviderName
=>
StringConstants
.
TypeScriptProviderName
;
protected
override
RoslynLSPClientLifeTimeService
LspClientLifeTimeService
=>
new
TypeScriptLSPClientLifeTimeService
();
private
class
TypeScriptLSPClientLifeTimeService
:
RoslynLSPClientLifeTimeService
{
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录