Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a014663a
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a014663a
编写于
12月 23, 2015
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove unused @Uses decoration
上级
0f84102b
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
71 addition
and
150 deletion
+71
-150
src/vs/platform/instantiation/common/instantiation.ts
src/vs/platform/instantiation/common/instantiation.ts
+71
-95
src/vs/platform/instantiation/test/common/instantiationService.test.ts
...rm/instantiation/test/common/instantiationService.test.ts
+0
-55
未找到文件。
src/vs/platform/instantiation/common/instantiation.ts
浏览文件 @
a014663a
此差异已折叠。
点击以展开。
src/vs/platform/instantiation/test/common/instantiationService.test.ts
浏览文件 @
a014663a
...
...
@@ -118,36 +118,6 @@ class DependentService implements IDependentService {
name
=
'
farboo
'
;
}
@
instantiation
.
Uses
(
IService1
)
class
UsesTarget
{
constructor
(
ctx
:
instantiation
.
Context
)
{
var
service
=
ctx
.
get
(
IService1
);
assert
.
ok
(
service
);
assert
.
equal
(
service
.
c
,
1
);
}
}
@
instantiation
.
Uses
(
IService2
)
class
UsesTarget2
extends
UsesTarget
{
constructor
(
ctx
:
instantiation
.
Context
)
{
super
(
ctx
);
var
service
=
ctx
.
get
(
IService2
);
assert
.
ok
(
service
);
assert
.
ok
(
service
.
d
);
}
}
class
UsesTarget3
extends
UsesTarget2
{
constructor
(
ctx
:
instantiation
.
Context
,
@
IService3
service
:
IService3
)
{
super
(
ctx
);
assert
.
ok
(
service
);
assert
.
equal
(
service
.
s
,
'
farboo
'
);
}
}
class
ParameterTarget
{
constructor
(
@
IService1
service1
:
IService1
)
{
...
...
@@ -298,31 +268,6 @@ suite('Instantiation Service', () => {
assert
.
throws
(()
=>
service
.
createInstance
(
EvilTarget1
));
});
test
(
'
@Uses - simple case
'
,
function
()
{
var
service
=
instantiationService
.
create
(
Object
.
create
(
null
));
service
.
addSingleton
(
IService1
,
new
Service1
());
var
target
=
service
.
createInstance
(
UsesTarget
);
});
test
(
'
@Uses - inheritance
'
,
function
()
{
var
service
=
instantiationService
.
create
(
Object
.
create
(
null
));
service
.
addSingleton
(
IService1
,
new
Service1
());
service
.
addSingleton
(
IService2
,
new
Service2
());
service
.
createInstance
(
UsesTarget2
);
});
test
(
'
@Uses and @IServiceName
'
,
function
()
{
var
service
=
instantiationService
.
create
(
Object
.
create
(
null
));
service
.
addSingleton
(
IService1
,
new
Service1
());
service
.
addSingleton
(
IService2
,
new
Service2
());
service
.
addSingleton
(
IService3
,
new
Service3
());
service
.
createInstance
(
<
instantiation
.
IConstructorSignature0
<
UsesTarget3
>>
UsesTarget3
);
});
test
(
'
@Param - simple clase
'
,
function
()
{
var
service
=
instantiationService
.
create
(
Object
.
create
(
null
));
service
.
addSingleton
(
IService1
,
new
Service1
());
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录