Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
743bbba7
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,发现更多精彩内容 >>
提交
743bbba7
编写于
1月 06, 2015
作者:
A
AlekseyTs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Eliminate ‘NeedsLocalization’ calls under Compilers.
***NO_CI*** (changeset 1392938)
上级
b5577426
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
142 addition
and
10 deletion
+142
-10
Src/Compilers/CSharp/Portable/Syntax/SyntaxFactory.cs
Src/Compilers/CSharp/Portable/Syntax/SyntaxFactory.cs
+2
-2
Src/Compilers/CSharp/Portable/Syntax/SyntaxReplacer.cs
Src/Compilers/CSharp/Portable/Syntax/SyntaxReplacer.cs
+1
-1
Src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
...Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
+63
-0
Src/Compilers/Core/Portable/CodeAnalysisResources.resx
Src/Compilers/Core/Portable/CodeAnalysisResources.resx
+21
-0
Src/Compilers/Core/Portable/Serialization/ObjectReader.cs
Src/Compilers/Core/Portable/Serialization/ObjectReader.cs
+10
-2
Src/Compilers/Core/Portable/Serialization/ObjectWriter.cs
Src/Compilers/Core/Portable/Serialization/ObjectWriter.cs
+5
-1
Src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions_Tracking.cs
...ers/Core/Portable/Syntax/SyntaxNodeExtensions_Tracking.cs
+1
-1
Src/Compilers/VisualBasic/Portable/Syntax/SyntaxNodeFactories.vb
...pilers/VisualBasic/Portable/Syntax/SyntaxNodeFactories.vb
+2
-2
Src/Compilers/VisualBasic/Portable/Syntax/SyntaxReplacer.vb
Src/Compilers/VisualBasic/Portable/Syntax/SyntaxReplacer.vb
+1
-1
Src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
Src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
+27
-0
Src/Workspaces/Core/Portable/WorkspacesResources.resx
Src/Workspaces/Core/Portable/WorkspacesResources.resx
+9
-0
未找到文件。
Src/Compilers/CSharp/Portable/Syntax/SyntaxFactory.cs
浏览文件 @
743bbba7
...
...
@@ -946,12 +946,12 @@ public static SyntaxTriviaList TriviaList(IEnumerable<SyntaxTrivia> trivias)
{
if
(!
HasSeparatedNodeTokenPattern
(
nodesAndTokens
))
{
throw
new
ArgumentException
(
"A node or token is out of sequence."
.
NeedsLocalization
()
);
throw
new
ArgumentException
(
CodeAnalysisResources
.
NodeOrTokenOutOfSequence
);
}
if
(!
NodesAreCorrectType
<
TNode
>(
nodesAndTokens
))
{
throw
new
ArgumentException
(
"A node in the list is not of the expected type."
.
NeedsLocalization
()
);
throw
new
ArgumentException
(
CodeAnalysisResources
.
UnexpectedTypeOfNodeInList
);
}
return
new
SeparatedSyntaxList
<
TNode
>(
nodesAndTokens
);
...
...
Src/Compilers/CSharp/Portable/Syntax/SyntaxReplacer.cs
浏览文件 @
743bbba7
...
...
@@ -278,7 +278,7 @@ private enum ListEditKind
private
static
InvalidOperationException
GetItemNotListElementException
()
{
return
new
InvalidOperationException
(
"The item specified is not the element of a list."
.
NeedsLocalization
()
);
return
new
InvalidOperationException
(
CodeAnalysisResources
.
MissingListItem
);
}
private
abstract
class
BaseListEditor
:
CSharpSyntaxRewriter
...
...
Src/Compilers/Core/Portable/CodeAnalysisResources.Designer.cs
浏览文件 @
743bbba7
...
...
@@ -511,6 +511,15 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to Node to track is not a descendant of the root..
/// </summary>
internal
static
string
InvalidNodeToTrack
{
get
{
return
ResourceManager
.
GetString
(
"InvalidNodeToTrack"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Invalid output kind for submission. DynamicallyLinkedLibrary expected..
/// </summary>
...
...
@@ -547,6 +556,15 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to The item specified is not the element of a list..
/// </summary>
internal
static
string
MissingListItem
{
get
{
return
ResourceManager
.
GetString
(
"MissingListItem"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to module.
/// </summary>
...
...
@@ -592,6 +610,42 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to Cannot deserialize type '{0}', no binder supplied..
/// </summary>
internal
static
string
NoBinderException
{
get
{
return
ResourceManager
.
GetString
(
"NoBinderException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to A node or token is out of sequence..
/// </summary>
internal
static
string
NodeOrTokenOutOfSequence
{
get
{
return
ResourceManager
.
GetString
(
"NodeOrTokenOutOfSequence"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Cannot deserialize type '{0}', it has no deserialization reader..
/// </summary>
internal
static
string
NoReaderException
{
get
{
return
ResourceManager
.
GetString
(
"NoReaderException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to The type '{0}' cannot be written, it does not implement IObjectWritable.
/// </summary>
internal
static
string
NotWritableException
{
get
{
return
ResourceManager
.
GetString
(
"NotWritableException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Output kind not supported..
/// </summary>
...
...
@@ -862,6 +916,15 @@ internal class CodeAnalysisResources {
}
}
/// <summary>
/// Looks up a localized string similar to A node in the list is not of the expected type..
/// </summary>
internal
static
string
UnexpectedTypeOfNodeInList
{
get
{
return
ResourceManager
.
GetString
(
"UnexpectedTypeOfNodeInList"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Unresolved: .
/// </summary>
...
...
Src/Compilers/Core/Portable/CodeAnalysisResources.resx
浏览文件 @
743bbba7
...
...
@@ -399,4 +399,25 @@
<data
name=
"ArgumentElementCannotBeNull"
xml:space=
"preserve"
>
<value>
Argument cannot have a null element.
</value>
</data>
<data
name=
"NoBinderException"
xml:space=
"preserve"
>
<value>
Cannot deserialize type '{0}', no binder supplied.
</value>
</data>
<data
name=
"NoReaderException"
xml:space=
"preserve"
>
<value>
Cannot deserialize type '{0}', it has no deserialization reader.
</value>
</data>
<data
name=
"NotWritableException"
xml:space=
"preserve"
>
<value>
The type '{0}' cannot be written, it does not implement IObjectWritable
</value>
</data>
<data
name=
"InvalidNodeToTrack"
xml:space=
"preserve"
>
<value>
Node to track is not a descendant of the root.
</value>
</data>
<data
name=
"NodeOrTokenOutOfSequence"
xml:space=
"preserve"
>
<value>
A node or token is out of sequence.
</value>
</data>
<data
name=
"UnexpectedTypeOfNodeInList"
xml:space=
"preserve"
>
<value>
A node in the list is not of the expected type.
</value>
</data>
<data
name=
"MissingListItem"
xml:space=
"preserve"
>
<value>
The item specified is not the element of a list.
</value>
</data>
</root>
\ No newline at end of file
Src/Compilers/Core/Portable/Serialization/ObjectReader.cs
浏览文件 @
743bbba7
...
...
@@ -495,12 +495,20 @@ private object CreateInstance(Type type)
private
Exception
NoBinderException
(
string
typeName
)
{
throw
new
InvalidOperationException
(
string
.
Format
(
"Cannot deserialize type '{0}', no binder supplied."
.
NeedsLocalization
(),
typeName
));
#if COMPILERCORE
throw
new
InvalidOperationException
(
string
.
Format
(
Microsoft
.
CodeAnalysis
.
CodeAnalysisResources
.
NoBinderException
,
typeName
));
#else
throw
new
InvalidOperationException
(
string
.
Format
(
Microsoft
.
CodeAnalysis
.
WorkspacesResources
.
NoBinderException
,
typeName
));
#endif
}
private
Exception
NoReaderException
(
string
typeName
)
{
throw
new
InvalidOperationException
(
string
.
Format
(
"Cannot deserialize type '{0}', it has no deserialization reader."
.
NeedsLocalization
(),
typeName
));
#if COMPILERCORE
throw
new
InvalidOperationException
(
string
.
Format
(
Microsoft
.
CodeAnalysis
.
CodeAnalysisResources
.
NoReaderException
,
typeName
));
#else
throw
new
InvalidOperationException
(
string
.
Format
(
Microsoft
.
CodeAnalysis
.
WorkspacesResources
.
NoReaderException
,
typeName
));
#endif
}
}
}
\ No newline at end of file
Src/Compilers/Core/Portable/Serialization/ObjectWriter.cs
浏览文件 @
743bbba7
...
...
@@ -582,7 +582,11 @@ private void WriteWritableObject(IObjectWritable instance)
private
Exception
NotWritableException
(
string
typeName
)
{
throw
new
InvalidOperationException
(
string
.
Format
(
"The type '{0}' cannot be written, it does not implement IObjectWritable"
.
NeedsLocalization
(),
typeName
));
#if COMPILERCORE
throw
new
InvalidOperationException
(
string
.
Format
(
CodeAnalysisResources
.
NotWritableException
,
typeName
));
#else
throw
new
InvalidOperationException
(
string
.
Format
(
WorkspacesResources
.
NotWritableException
,
typeName
));
#endif
}
}
}
\ No newline at end of file
Src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions_Tracking.cs
浏览文件 @
743bbba7
...
...
@@ -40,7 +40,7 @@ public static TRoot TrackNodes<TRoot>(this TRoot root, IEnumerable<SyntaxNode> n
{
if
(!
IsDescendant
(
root
,
node
))
{
throw
new
ArgumentException
(
"Node to track is not a descendant of the root."
.
NeedsLocalization
()
);
throw
new
ArgumentException
(
CodeAnalysisResources
.
InvalidNodeToTrack
);
}
nodeToIdMap
.
GetValue
(
node
,
n
=>
new
SyntaxAnnotation
(
IdAnnotationKind
));
...
...
Src/Compilers/VisualBasic/Portable/Syntax/SyntaxNodeFactories.vb
浏览文件 @
743bbba7
...
...
@@ -954,11 +954,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' <param name="nodesAndTokens">An alternating list of nodes and tokens.</param>
Public
Shared
Function
SeparatedList
(
Of
TNode
As
SyntaxNode
)(
nodesAndTokens
As
SyntaxNodeOrTokenList
)
As
SeparatedSyntaxList
(
Of
TNode
)
If
Not
HasSeparatedNodeTokenPattern
(
nodesAndTokens
)
Then
Throw
New
ArgumentException
(
"A node or token is out of sequence."
.
NeedsLocalization
()
)
Throw
New
ArgumentException
(
CodeAnalysisResources
.
NodeOrTokenOutOfSequence
)
End
If
If
Not
NodesAreCorrectType
(
Of
TNode
)(
nodesAndTokens
)
Then
Throw
New
ArgumentException
(
"A node in the list is not of the expected type."
.
NeedsLocalization
()
)
Throw
New
ArgumentException
(
CodeAnalysisResources
.
UnexpectedTypeOfNodeInList
)
End
If
Return
New
SeparatedSyntaxList
(
Of
TNode
)(
nodesAndTokens
)
...
...
Src/Compilers/VisualBasic/Portable/Syntax/SyntaxReplacer.vb
浏览文件 @
743bbba7
...
...
@@ -223,7 +223,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax
End
Enum
Private
Shared
Function
GetItemNotListElementException
()
As
InvalidOperationException
Return
New
InvalidOperationException
(
"The item specified is not the element of a list."
.
NeedsLocalization
()
)
Return
New
InvalidOperationException
(
CodeAnalysisResources
.
MissingListItem
)
End
Function
Private
Class
BaseListEditor
...
...
Src/Workspaces/Core/Portable/WorkspacesResources.Designer.cs
浏览文件 @
743bbba7
...
...
@@ -673,6 +673,15 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Cannot deserialize type '{0}', no binder supplied..
/// </summary>
internal
static
string
NoBinderException
{
get
{
return
ResourceManager
.
GetString
(
"NoBinderException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Node is of the wrong type..
/// </summary>
...
...
@@ -682,6 +691,24 @@ internal class WorkspacesResources {
}
}
/// <summary>
/// Looks up a localized string similar to Cannot deserialize type '{0}', it has no deserialization reader..
/// </summary>
internal
static
string
NoReaderException
{
get
{
return
ResourceManager
.
GetString
(
"NoReaderException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to The type '{0}' cannot be written, it does not implement IObjectWritable.
/// </summary>
internal
static
string
NotWritableException
{
get
{
return
ResourceManager
.
GetString
(
"NotWritableException"
,
resourceCulture
);
}
}
/// <summary>
/// Looks up a localized string similar to Specified path must be absolute..
/// </summary>
...
...
Src/Workspaces/Core/Portable/WorkspacesResources.resx
浏览文件 @
743bbba7
...
...
@@ -414,4 +414,13 @@
<data
name=
"DiagnosticMustHaveMatchingSpan"
xml:space=
"preserve"
>
<value>
Diagnostic must have span '{0}'
</value>
</data>
<data
name=
"NoBinderException"
xml:space=
"preserve"
>
<value>
Cannot deserialize type '{0}', no binder supplied.
</value>
</data>
<data
name=
"NoReaderException"
xml:space=
"preserve"
>
<value>
Cannot deserialize type '{0}', it has no deserialization reader.
</value>
</data>
<data
name=
"NotWritableException"
xml:space=
"preserve"
>
<value>
The type '{0}' cannot be written, it does not implement IObjectWritable
</value>
</data>
</root>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录