Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
14a937c9
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,发现更多精彩内容 >>
提交
14a937c9
编写于
4月 14, 2014
作者:
R
RoslynTeam
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://git01.codeplex.com/forks/derekschindelman/djscorrections
capitalization and grammar of comments in several folders.
上级
f2a03e15
7eecaf23
变更
16
展开全部
显示空白变更内容
内联
并排
Showing
16 changed file
with
117 addition
and
117 deletion
+117
-117
Src/Workspaces/Core/CaseCorrection/CaseCorrector.cs
Src/Workspaces/Core/CaseCorrection/CaseCorrector.cs
+1
-1
Src/Workspaces/Core/CaseCorrection/ICaseCorrectionService.cs
Src/Workspaces/Core/CaseCorrection/ICaseCorrectionService.cs
+1
-1
Src/Workspaces/Core/CodeCleanup/AbstractCodeCleanerService.cs
...Workspaces/Core/CodeCleanup/AbstractCodeCleanerService.cs
+72
-72
Src/Workspaces/Core/CodeCleanup/CodeCleaner.cs
Src/Workspaces/Core/CodeCleanup/CodeCleaner.cs
+15
-15
Src/Workspaces/Core/CodeCleanup/ICodeCleanerService.cs
Src/Workspaces/Core/CodeCleanup/ICodeCleanerService.cs
+6
-6
Src/Workspaces/Core/CodeCleanup/Providers/ExportCodeCleanupProvider.cs
...s/Core/CodeCleanup/Providers/ExportCodeCleanupProvider.cs
+1
-1
Src/Workspaces/Core/CodeCleanup/Providers/FormatCodeCleanupProvider.cs
...s/Core/CodeCleanup/Providers/FormatCodeCleanupProvider.cs
+2
-2
Src/Workspaces/Core/CodeCleanup/Providers/ICodeCleanupProvider.cs
...spaces/Core/CodeCleanup/Providers/ICodeCleanupProvider.cs
+5
-5
Src/Workspaces/Core/CodeCleanup/Providers/SimpleCodeCleanupProvider.cs
...s/Core/CodeCleanup/Providers/SimpleCodeCleanupProvider.cs
+1
-1
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerationService.cs
...aces/Core/CodeGeneration/AbstractCodeGenerationService.cs
+1
-1
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerationService_FindDeclaration.cs
...neration/AbstractCodeGenerationService_FindDeclaration.cs
+2
-2
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerator_Constants.cs
...es/Core/CodeGeneration/AbstractCodeGenerator_Constants.cs
+2
-2
Src/Workspaces/Core/CodeGeneration/CodeGenerationOptions.cs
Src/Workspaces/Core/CodeGeneration/CodeGenerationOptions.cs
+1
-1
Src/Workspaces/Core/Differencing/Edit.cs
Src/Workspaces/Core/Differencing/Edit.cs
+1
-1
Src/Workspaces/Core/Differencing/Match.cs
Src/Workspaces/Core/Differencing/Match.cs
+2
-2
Src/Workspaces/Core/Options/OptionService.cs
Src/Workspaces/Core/Options/OptionService.cs
+4
-4
未找到文件。
Src/Workspaces/Core/CaseCorrection/CaseCorrector.cs
浏览文件 @
14a937c9
...
...
@@ -53,7 +53,7 @@ public static async Task<Document> CaseCorrectAsync(Document document, IEnumerab
}
/// <summary>
///
case correct only things that does
n't require semantic information
///
Case correct only things that do
n't require semantic information
/// </summary>
internal
static
SyntaxNode
CaseCorrect
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
Src/Workspaces/Core/CaseCorrection/ICaseCorrectionService.cs
浏览文件 @
14a937c9
...
...
@@ -16,7 +16,7 @@ internal interface ICaseCorrectionService : ILanguageService
Task
<
Document
>
CaseCorrectAsync
(
Document
document
,
IEnumerable
<
TextSpan
>
spans
,
CancellationToken
cancellationToken
);
/// <summary>
///
case corrects only things that does
n't require semantic information
///
Case corrects only things that do
n't require semantic information
/// </summary>
SyntaxNode
CaseCorrect
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
CancellationToken
cancellationToken
);
}
...
...
Src/Workspaces/Core/CodeCleanup/AbstractCodeCleanerService.cs
浏览文件 @
14a937c9
此差异已折叠。
点击以展开。
Src/Workspaces/Core/CodeCleanup/CodeCleaner.cs
浏览文件 @
14a937c9
...
...
@@ -14,14 +14,14 @@
namespace
Microsoft.CodeAnalysis.CodeCleanup
{
/// <summary>
///
static CodeCleaner class that provides default code cleaning behavior
///
Static CodeCleaner class that provides default code cleaning behavior.
/// </summary>
internal
static
class
CodeCleaner
{
/// <summary>
///
return default code cleaners for a given document
///
Return default code cleaners for a given document.
///
///
this can be modified and given to Cleanup method to provide different cleaners
///
This can be modified and given to the Cleanup method to provide different cleaners.
/// </summary>
public
static
IEnumerable
<
ICodeCleanupProvider
>
GetDefaultProviders
(
Document
document
)
{
...
...
@@ -42,8 +42,8 @@ public static IEnumerable<ICodeCleanupProvider> GetDefaultProviders(Document doc
}
/// <summary>
/// Clean up the whole document.
/// Optionally you can provide your own options and code cleaners.
otherwise,
default will be used.
/// Clean
s
up the whole document.
/// Optionally you can provide your own options and code cleaners.
Otherwise, the
default will be used.
/// </summary>
public
static
async
Task
<
Document
>
CleanupAsync
(
Document
document
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
@@ -52,8 +52,8 @@ public static async Task<Document> CleanupAsync(Document document, IEnumerable<I
}
/// <summary>
/// Clean up the document marked with the provided annotation.
/// Optionally you can provide your own options and code cleaners.
otherwise,
default will be used.
/// Clean
s
up the document marked with the provided annotation.
/// Optionally you can provide your own options and code cleaners.
Otherwise, the
default will be used.
/// </summary>
public
static
async
Task
<
Document
>
CleanupAsync
(
Document
document
,
SyntaxAnnotation
annotation
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
@@ -62,8 +62,8 @@ public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotat
}
/// <summary>
/// Clean up the provided span in the document
/// Optionally you can provide your own options and code cleaners.
otherwise,
default will be used.
/// Clean up the provided span in the document
.
/// Optionally you can provide your own options and code cleaners.
Otherwise, the
default will be used.
/// </summary>
public
static
Task
<
Document
>
CleanupAsync
(
Document
document
,
TextSpan
span
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
@@ -71,8 +71,8 @@ public static Task<Document> CleanupAsync(Document document, TextSpan span, IEnu
}
/// <summary>
/// Clean up the provided spans in the document
/// Optionally you can provide your own options and code cleaners.
otherwise,
default will be used.
/// Clean up the provided spans in the document
.
/// Optionally you can provide your own options and code cleaners.
Otherwise, the
default will be used.
/// </summary>
public
static
Task
<
Document
>
CleanupAsync
(
Document
document
,
IEnumerable
<
TextSpan
>
spans
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
@@ -81,8 +81,8 @@ public static Task<Document> CleanupAsync(Document document, IEnumerable<TextSpa
}
/// <summary>
/// Clean up the provided span in the node
///
this will only cleanup stuff that doesn't require semantic information
/// Clean up the provided span in the node
.
///
This will only cleanup stuff that doesn't require semantic information.
/// </summary>
public
static
SyntaxNode
Cleanup
(
SyntaxNode
root
,
TextSpan
span
,
Workspace
workspace
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
@@ -90,8 +90,8 @@ public static SyntaxNode Cleanup(SyntaxNode root, TextSpan span, Workspace works
}
/// <summary>
/// Clean up the provided spans in the node
///
this will only cleanup stuff that doesn't require semantic information
/// Clean up the provided spans in the node
.
///
This will only cleanup stuff that doesn't require semantic information.
/// </summary>
public
static
SyntaxNode
Cleanup
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
IEnumerable
<
ICodeCleanupProvider
>
providers
=
null
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
))
{
...
...
Src/Workspaces/Core/CodeCleanup/ICodeCleanerService.cs
浏览文件 @
14a937c9
...
...
@@ -10,26 +10,26 @@
namespace
Microsoft.CodeAnalysis.CodeCleanup
{
/// <summary>
///
internal code cleanup service interface
///
Internal code cleanup service interface.
///
///
this is not supposed to be used directly. it just provide a way to get the right service from each language
///
This is not supposed to be used directly. It just provides a way to get the right service from each language.
/// </summary>
internal
interface
ICodeCleanerService
:
ILanguageService
{
/// <summary>
///
returns default code cleaners
///
Returns the default code cleaners.
/// </summary>
IEnumerable
<
ICodeCleanupProvider
>
GetDefaultProviders
();
/// <summary>
///
t
his will run all provided code cleaners in an order that is given to the method.
///
T
his will run all provided code cleaners in an order that is given to the method.
/// </summary>
Task
<
Document
>
CleanupAsync
(
Document
document
,
IEnumerable
<
TextSpan
>
spans
,
IEnumerable
<
ICodeCleanupProvider
>
providers
,
CancellationToken
cancellationToken
);
/// <summary>
///
t
his will run all provided code cleaners in an order that is given to the method.
///
T
his will run all provided code cleaners in an order that is given to the method.
///
///
this will do cleanups that doesn't require any semantic information
///
This will do cleanups that don't require any semantic information.
/// </summary>
SyntaxNode
Cleanup
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
IEnumerable
<
ICodeCleanupProvider
>
providers
,
CancellationToken
cancellationToken
);
}
...
...
Src/Workspaces/Core/CodeCleanup/Providers/ExportCodeCleanupProvider.cs
浏览文件 @
14a937c9
...
...
@@ -8,7 +8,7 @@
namespace
Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
/// Specifies the exact type of the code cleanup exported
/// Specifies the exact type of the code cleanup exported
.
/// </summary>
[
MetadataAttribute
]
[
AttributeUsage
(
AttributeTargets
.
Class
)]
...
...
Src/Workspaces/Core/CodeCleanup/Providers/FormatCodeCleanupProvider.cs
浏览文件 @
14a937c9
...
...
@@ -17,7 +17,7 @@ public string Name
public
async
Task
<
Document
>
CleanupAsync
(
Document
document
,
IEnumerable
<
TextSpan
>
spans
,
CancellationToken
cancellationToken
)
{
//
if old text already exist, use fast path for formatting
//
If the old text already exists, use the fast path for formatting.
SourceText
oldText
;
if
(
document
.
TryGetText
(
out
oldText
))
{
...
...
@@ -31,7 +31,7 @@ public async Task<Document> CleanupAsync(Document document, IEnumerable<TextSpan
public
SyntaxNode
Cleanup
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
CancellationToken
cancellationToken
)
{
//
if old text already exist, use fast path for formatting
//
If the old text already exists, use the fast path for formatting.
SourceText
oldText
;
if
(
root
.
SyntaxTree
!=
null
&&
root
.
SyntaxTree
.
TryGetText
(
out
oldText
))
{
...
...
Src/Workspaces/Core/CodeCleanup/Providers/ICodeCleanupProvider.cs
浏览文件 @
14a937c9
...
...
@@ -8,24 +8,24 @@
namespace
Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
///
code cleaner that requires semantic information to do its job
///
A code cleaner that requires semantic information to do its job.
/// </summary>
internal
interface
ICodeCleanupProvider
{
/// <summary>
///
return name of this provider
///
Returns the name of this provider.
/// </summary>
string
Name
{
get
;
}
/// <summary>
///
this should apply its code clean up logic to the spans of the document
///
This should apply its code clean up logic to the spans of the document.
/// </summary>
Task
<
Document
>
CleanupAsync
(
Document
document
,
IEnumerable
<
TextSpan
>
spans
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
));
/// <summary>
///
t
his will run all provided code cleaners in an order that is given to the method.
///
T
his will run all provided code cleaners in an order that is given to the method.
///
///
this will do cleanups that does
n't require any semantic information
///
This will do cleanups that do
n't require any semantic information
/// </summary>
SyntaxNode
Cleanup
(
SyntaxNode
root
,
IEnumerable
<
TextSpan
>
spans
,
Workspace
workspace
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
));
}
...
...
Src/Workspaces/Core/CodeCleanup/Providers/SimpleCodeCleanupProvider.cs
浏览文件 @
14a937c9
...
...
@@ -10,7 +10,7 @@
namespace
Microsoft.CodeAnalysis.CodeCleanup.Providers
{
/// <summary>
///
simple helper class that returns ICodeCleanup implementation
///
Helper class that implements <see cref="ICodeCleanupProvider"/> using delegates passed to its constructor.
/// </summary>
internal
class
SimpleCodeCleanupProvider
:
ICodeCleanupProvider
{
...
...
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerationService.cs
浏览文件 @
14a937c9
...
...
@@ -185,7 +185,7 @@ protected static T Cast<T>(object value)
var
currentDestination
=
destination
;
// Filter out the members that are implicitly declared. T
H
ey're implicit, hence we do
// Filter out the members that are implicitly declared. T
h
ey're implicit, hence we do
// not want an explicit declaration.
var
filteredMembers
=
membersList
.
Where
(
m
=>
!
m
.
IsImplicitlyDeclared
);
...
...
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerationService_FindDeclaration.cs
浏览文件 @
14a937c9
...
...
@@ -144,8 +144,8 @@ class NestedType
#endif
// If we're at the specified context location, but we're trying to find the most
// relevant part for C, then we want to pick the part in C.cs not the one in
// C.NestedType.cs that contains the context location. This is because this
simply
// container
really
isn't really used by the user to place code, but is instead just
// C.NestedType.cs that contains the context location. This is because this
// container isn't really used by the user to place code, but is instead just
// used to separate out the nested type. It would be nice to detect this and do the
// right thing.
declaration
=
await
SelectFirstOrDefaultAsync
(
declarations
,
token
.
Parent
.
AncestorsAndSelf
().
Contains
,
cancellationToken
).
ConfigureAwait
(
false
);
...
...
Src/Workspaces/Core/CodeGeneration/AbstractCodeGenerator_Constants.cs
浏览文件 @
14a937c9
...
...
@@ -18,7 +18,7 @@ internal abstract partial class AbstractCodeGenerator : IComparer<ValueTuple<IFi
protected
SyntaxNode
CreateEnumConstantValue
(
INamedTypeSymbol
enumType
,
object
constantValue
)
{
// Code copied from System.Enum
// Code copied from System.Enum
.
var
isFlagsEnum
=
IsFlagsEnum
(
enumType
);
if
(
isFlagsEnum
)
{
...
...
@@ -100,7 +100,7 @@ private SyntaxNode CreateFlagsEnumConstantValue(INamedTypeSymbol enumType, objec
var
syntaxFactory
=
GetSyntaxFactory
();
// We were able to represent this number as a bitwise
or
of valid flags.
// We were able to represent this number as a bitwise
OR
of valid flags.
if
(
result
==
0
&&
usedFieldsAndValues
.
Count
>
0
)
{
// We want to emit the fields in lower to higher value. So we walk backward.
...
...
Src/Workspaces/Core/CodeGeneration/CodeGenerationOptions.cs
浏览文件 @
14a937c9
...
...
@@ -9,7 +9,7 @@
namespace
Microsoft.CodeAnalysis.CodeGeneration
{
/// <summary>
/// Options for controlling the code produced by the
ICodeGenerationService
.
/// Options for controlling the code produced by the
<see cref="ICodeGenerationService"/>
.
/// </summary>
public
class
CodeGenerationOptions
{
...
...
Src/Workspaces/Core/Differencing/Edit.cs
浏览文件 @
14a937c9
...
...
@@ -87,7 +87,7 @@ public override int GetHashCode()
return
hash
;
}
//
h
as to be 'internal' for now as it's used by EnC test tool
//
H
as to be 'internal' for now as it's used by EnC test tool
internal
string
GetDebuggerDisplay
()
{
string
result
=
Kind
.
ToString
();
...
...
Src/Workspaces/Core/Differencing/Match.cs
浏览文件 @
14a937c9
...
...
@@ -34,13 +34,13 @@ internal Match(TNode root1, TNode root2, TreeComparer<TNode> nodeComparer, IEnum
int
labelCount
=
nodeComparer
.
LabelCount
;
//
c
alculate chains (not including root node):
//
C
alculate chains (not including root node):
int
count1
,
count2
;
List
<
TNode
>[]
nodes1
,
nodes2
;
CategorizeNodesByLabels
(
root1
,
labelCount
,
out
nodes1
,
out
count1
);
CategorizeNodesByLabels
(
root2
,
labelCount
,
out
nodes2
,
out
count2
);
//
c
alculate match:
//
C
alculate match:
this
.
oneToTwo
=
new
Dictionary
<
TNode
,
TNode
>(
count1
);
this
.
twoToOne
=
new
Dictionary
<
TNode
,
TNode
>(
count2
);
...
...
Src/Workspaces/Core/Options/OptionService.cs
浏览文件 @
14a937c9
...
...
@@ -72,14 +72,14 @@ private object LoadOptionFromSerializerOrGetDefault(OptionKey optionKey)
{
foreach
(
var
serializer
in
optionSerializers
)
{
//
there can be options (ex, formatting) that only exist in only one specific language. i
n those cases,
//
There can be options (ex, formatting) that only exist in only one specific language. I
n those cases,
// feature's serialzier should exist in only that language.
if
(!
SupportedSerializer
(
optionKey
,
serializer
.
Metadata
))
{
continue
;
}
// We have
one a deserializer, so deserialize and use that value
// We have
a deserializer, so deserialize and use that value.
object
deserializedValue
;
if
(
serializer
.
Value
.
TryFetch
(
optionKey
,
out
deserializedValue
))
{
...
...
@@ -151,7 +151,7 @@ public void SetOptions(OptionSet optionSet)
if
(
object
.
Equals
(
currentValue
,
setValue
))
{
// Identical, so nothing changing
// Identical, so nothing
is
changing
continue
;
}
...
...
@@ -165,7 +165,7 @@ public void SetOptions(OptionSet optionSet)
{
foreach
(
var
serializer
in
optionSerializers
)
{
//
there can be options (ex, formatting) that only exist in only one specific language. i
n those cases,
//
There can be options (ex, formatting) that only exist in only one specific language. I
n those cases,
// feature's serialzier should exist in only that language.
if
(!
SupportedSerializer
(
optionKey
,
serializer
.
Metadata
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录