Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
runtime
提交
a4d877e0
R
runtime
项目概览
dotNET Platform
/
runtime
11 个月 前同步成功
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
runtime
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a4d877e0
编写于
11月 26, 2020
作者:
M
Marek Safar
提交者:
GitHub
11月 26, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reverse ctors chaining for few SPC types to avoid calling complex ctors unnecessary (#45239)
上级
eb7837c2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
20 deletion
+19
-20
src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs
...es/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs
+3
-2
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
...ivate.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
+8
-9
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs
...Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs
+8
-9
未找到文件。
src/libraries/System.Private.CoreLib/src/System/Text/UTF8Encoding.cs
浏览文件 @
a4d877e0
...
...
@@ -69,13 +69,14 @@ public partial class UTF8Encoding : Encoding
private
readonly
bool
_isThrowException
;
public
UTF8Encoding
()
:
this
(
false
)
public
UTF8Encoding
()
:
base
(
UTF8_CODEPAGE
)
{
}
public
UTF8Encoding
(
bool
encoderShouldEmitUTF8Identifier
)
:
base
(
UTF8_CODEPAGE
)
this
(
)
{
_emitUTF8Identifier
=
encoderShouldEmitUTF8Identifier
;
}
...
...
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/FutureFactory.cs
浏览文件 @
a4d877e0
...
...
@@ -64,7 +64,6 @@ private TaskScheduler GetDefaultScheduler(Task? currTask)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
()
:
this
(
default
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
null
)
{
}
...
...
@@ -85,8 +84,8 @@ public TaskFactory()
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
CancellationToken
cancellationToken
)
:
this
(
cancellationToken
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
null
)
{
m_defaultCancellationToken
=
cancellationToken
;
}
/// <summary>
...
...
@@ -109,8 +108,8 @@ public TaskFactory(CancellationToken cancellationToken)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
TaskScheduler
?
scheduler
)
// null means to use TaskScheduler.Current
:
this
(
default
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
scheduler
)
{
m_defaultScheduler
=
scheduler
;
}
/// <summary>
...
...
@@ -140,8 +139,12 @@ public TaskFactory(CancellationToken cancellationToken)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
TaskCreationOptions
creationOptions
,
TaskContinuationOptions
continuationOptions
)
:
this
(
default
,
creationOptions
,
continuationOptions
,
null
)
{
TaskFactory
.
CheckMultiTaskContinuationOptions
(
continuationOptions
);
TaskFactory
.
CheckCreationOptions
(
creationOptions
);
m_defaultCreationOptions
=
creationOptions
;
m_defaultContinuationOptions
=
continuationOptions
;
}
/// <summary>
...
...
@@ -180,14 +183,10 @@ public TaskFactory(TaskCreationOptions creationOptions, TaskContinuationOptions
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
CancellationToken
cancellationToken
,
TaskCreationOptions
creationOptions
,
TaskContinuationOptions
continuationOptions
,
TaskScheduler
?
scheduler
)
:
this
(
creationOptions
,
continuationOptions
)
{
TaskFactory
.
CheckMultiTaskContinuationOptions
(
continuationOptions
);
TaskFactory
.
CheckCreationOptions
(
creationOptions
);
m_defaultCancellationToken
=
cancellationToken
;
m_defaultScheduler
=
scheduler
;
m_defaultCreationOptions
=
creationOptions
;
m_defaultContinuationOptions
=
continuationOptions
;
}
/* Properties */
...
...
src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/TaskFactory.cs
浏览文件 @
a4d877e0
...
...
@@ -70,7 +70,6 @@ private TaskScheduler GetDefaultScheduler(Task? currTask)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
()
:
this
(
default
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
null
)
{
}
...
...
@@ -91,8 +90,8 @@ public TaskFactory()
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
CancellationToken
cancellationToken
)
:
this
(
cancellationToken
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
null
)
{
m_defaultCancellationToken
=
cancellationToken
;
}
/// <summary>
...
...
@@ -115,8 +114,8 @@ public TaskFactory(CancellationToken cancellationToken)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
TaskScheduler
?
scheduler
)
// null means to use TaskScheduler.Current
:
this
(
default
,
TaskCreationOptions
.
None
,
TaskContinuationOptions
.
None
,
scheduler
)
{
m_defaultScheduler
=
scheduler
;
}
/// <summary>
...
...
@@ -146,8 +145,12 @@ public TaskFactory(CancellationToken cancellationToken)
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
TaskCreationOptions
creationOptions
,
TaskContinuationOptions
continuationOptions
)
:
this
(
default
,
creationOptions
,
continuationOptions
,
null
)
{
CheckMultiTaskContinuationOptions
(
continuationOptions
);
CheckCreationOptions
(
creationOptions
);
m_defaultCreationOptions
=
creationOptions
;
m_defaultContinuationOptions
=
continuationOptions
;
}
/// <summary>
...
...
@@ -186,14 +189,10 @@ public TaskFactory(TaskCreationOptions creationOptions, TaskContinuationOptions
/// cref="System.Threading.Tasks.TaskScheduler.Current">TaskScheduler.Current</see>).
/// </remarks>
public
TaskFactory
(
CancellationToken
cancellationToken
,
TaskCreationOptions
creationOptions
,
TaskContinuationOptions
continuationOptions
,
TaskScheduler
?
scheduler
)
:
this
(
creationOptions
,
continuationOptions
)
{
CheckMultiTaskContinuationOptions
(
continuationOptions
);
CheckCreationOptions
(
creationOptions
);
m_defaultCancellationToken
=
cancellationToken
;
m_defaultScheduler
=
scheduler
;
m_defaultCreationOptions
=
creationOptions
;
m_defaultContinuationOptions
=
continuationOptions
;
}
internal
static
void
CheckCreationOptions
(
TaskCreationOptions
creationOptions
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录