Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
64fd3776
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,发现更多精彩内容 >>
提交
64fd3776
编写于
4月 27, 2015
作者:
B
bartkoelman
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use nameof() in calls to ArgumentException ctor
上级
f21b13d4
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
8 addition
and
8 deletion
+8
-8
src/Compilers/Core/Portable/Text/LinePositionSpan.cs
src/Compilers/Core/Portable/Text/LinePositionSpan.cs
+1
-1
src/Compilers/Test/Utilities/CSharp/Extensions.cs
src/Compilers/Test/Utilities/CSharp/Extensions.cs
+1
-1
src/Compilers/Test/Utilities/Core2/DirectoryHelper.cs
src/Compilers/Test/Utilities/Core2/DirectoryHelper.cs
+1
-1
src/ExpressionEvaluator/Core/Test/ResultProvider/Debugger/Engine/DkmDataContainer.cs
...e/Test/ResultProvider/Debugger/Engine/DkmDataContainer.cs
+1
-1
src/Scripting/Core/InteractiveAssemblyLoader.cs
src/Scripting/Core/InteractiveAssemblyLoader.cs
+1
-1
src/Scripting/Test/ScriptEngine.cs
src/Scripting/Test/ScriptEngine.cs
+1
-1
src/Test/Utilities/DiagnosticExtensions.cs
src/Test/Utilities/DiagnosticExtensions.cs
+1
-1
src/Test/Utilities/TestHelpers.cs
src/Test/Utilities/TestHelpers.cs
+1
-1
未找到文件。
src/Compilers/Core/Portable/Text/LinePositionSpan.cs
浏览文件 @
64fd3776
...
...
@@ -23,7 +23,7 @@ public LinePositionSpan(LinePosition start, LinePosition end)
{
if
(
end
<
start
)
{
throw
new
ArgumentException
(
"end"
,
CodeAnalysisResources
.
EndMustNotBeLessThanStart
);
throw
new
ArgumentException
(
CodeAnalysisResources
.
EndMustNotBeLessThanStart
,
nameof
(
end
)
);
}
_start
=
start
;
...
...
src/Compilers/Test/Utilities/CSharp/Extensions.cs
浏览文件 @
64fd3776
...
...
@@ -41,7 +41,7 @@ public static SyntaxNodeOrToken FindNodeOrTokenByKind(this SyntaxTree syntaxTree
{
if
(!(
occurrence
>
0
))
{
throw
new
ArgumentException
(
"Specified value must be greater than zero."
,
"occurrence"
);
throw
new
ArgumentException
(
"Specified value must be greater than zero."
,
nameof
(
occurrence
)
);
}
SyntaxNodeOrToken
foundNode
=
default
(
SyntaxNodeOrToken
);
if
(
TryFindNodeOrToken
(
syntaxTree
.
GetCompilationUnitRoot
(),
kind
,
ref
occurrence
,
ref
foundNode
))
...
...
src/Compilers/Test/Utilities/Core2/DirectoryHelper.cs
浏览文件 @
64fd3776
...
...
@@ -16,7 +16,7 @@ public DirectoryHelper(string path)
{
if
(!
Directory
.
Exists
(
path
))
{
throw
new
ArgumentException
(
"Directory '"
+
path
+
"' does not exist."
,
"path"
);
throw
new
ArgumentException
(
"Directory '"
+
path
+
"' does not exist."
,
nameof
(
path
)
);
}
_rootPath
=
path
;
...
...
src/ExpressionEvaluator/Core/Test/ResultProvider/Debugger/Engine/DkmDataContainer.cs
浏览文件 @
64fd3776
...
...
@@ -35,7 +35,7 @@ public abstract class DkmDataContainer
{
if
(
_dataItems
.
ContainsKey
(
key
))
{
throw
new
ArgumentException
(
"Data item already exists"
,
"item"
);
throw
new
ArgumentException
(
"Data item already exists"
,
nameof
(
item
)
);
}
}
...
...
src/Scripting/Core/InteractiveAssemblyLoader.cs
浏览文件 @
64fd3776
...
...
@@ -148,7 +148,7 @@ public AssemblyLoadResult LoadFromPath(string path)
if
(!
PathUtilities
.
IsAbsolute
(
path
))
{
throw
new
ArgumentException
(
"Path must be absolute"
,
"path"
);
throw
new
ArgumentException
(
"Path must be absolute"
,
nameof
(
path
)
);
}
try
...
...
src/Scripting/Test/ScriptEngine.cs
浏览文件 @
64fd3776
...
...
@@ -303,7 +303,7 @@ internal static void ValidateNamespace(string @namespace)
if
(!
@namespace
.
IsValidClrNamespaceName
())
{
throw
new
ArgumentException
(
"Invalid namespace name"
,
"namespace"
);
throw
new
ArgumentException
(
"Invalid namespace name"
,
nameof
(
@namespace
)
);
}
}
...
...
src/Test/Utilities/DiagnosticExtensions.cs
浏览文件 @
64fd3776
...
...
@@ -64,7 +64,7 @@ private static void Verify(IEnumerable<Diagnostic> actual, DiagnosticDescription
{
if
(
expected
==
null
)
{
throw
new
ArgumentException
(
"Must specify expected errors."
,
"expected"
);
throw
new
ArgumentException
(
"Must specify expected errors."
,
nameof
(
expected
)
);
}
var
unmatched
=
actual
.
Select
(
d
=>
new
DiagnosticDescription
(
d
,
errorCodeOnly
)).
ToList
();
...
...
src/Test/Utilities/TestHelpers.cs
浏览文件 @
64fd3776
...
...
@@ -14,7 +14,7 @@ public static IEnumerable<Type> GetAllTypesImplementingGivenInterface(Assembly a
{
if
(
assembly
==
null
||
interfaceType
==
null
||
!
interfaceType
.
IsInterface
)
{
throw
new
ArgumentException
(
"interfaceType is not an interface."
,
"interfaceType"
);
throw
new
ArgumentException
(
"interfaceType is not an interface."
,
nameof
(
interfaceType
)
);
}
return
assembly
.
GetTypes
().
Where
((
t
)
=>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录