Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
2732b85f
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,发现更多精彩内容 >>
提交
2732b85f
编写于
6月 28, 2019
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use default literal
上级
fca0fde0
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
20 addition
and
20 deletion
+20
-20
src/EditorFeatures/Core/Commands/CutCommandArgs.cs
src/EditorFeatures/Core/Commands/CutCommandArgs.cs
+2
-2
src/EditorFeatures/TestUtilities/BraceHighlighting/MultiCharacterBraceHighlightingTests.cs
...BraceHighlighting/MultiCharacterBraceHighlightingTests.cs
+1
-1
src/EditorFeatures/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs
...s/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs
+1
-1
src/EditorFeatures/TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
...TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
+1
-1
src/EditorFeatures/TestUtilities/EditAndContinue/ActiveStatementsDescription.cs
...tUtilities/EditAndContinue/ActiveStatementsDescription.cs
+1
-1
src/EditorFeatures/TestUtilities/EditAndContinue/DeclaratorMapDescription.cs
...TestUtilities/EditAndContinue/DeclaratorMapDescription.cs
+1
-1
src/EditorFeatures/TestUtilities/EditAndContinue/EditAndContinueTestHelpers.cs
...stUtilities/EditAndContinue/EditAndContinueTestHelpers.cs
+1
-1
src/EditorFeatures/TestUtilities/EditAndContinue/Extensions.cs
...ditorFeatures/TestUtilities/EditAndContinue/Extensions.cs
+1
-1
src/EditorFeatures/TestUtilities/MoveType/AbstractMoveTypeTest.cs
...orFeatures/TestUtilities/MoveType/AbstractMoveTypeTest.cs
+1
-1
src/EditorFeatures/TestUtilities/Squiggles/AbstractSquiggleProducerTests.cs
.../TestUtilities/Squiggles/AbstractSquiggleProducerTests.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/NoCompilationDocumentDiagnosticAnalyzer.cs
...ies/Workspaces/NoCompilationDocumentDiagnosticAnalyzer.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestForegroundNotificationService.cs
...Utilities/Workspaces/TestForegroundNotificationService.cs
+4
-4
src/EditorFeatures/TestUtilities/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
...ies/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
+1
-1
src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace_XmlConsumption.cs
.../TestUtilities/Workspaces/TestWorkspace_XmlConsumption.cs
+3
-3
未找到文件。
src/EditorFeatures/Core/Commands/CutCommandArgs.cs
浏览文件 @
2732b85f
...
...
@@ -12,8 +12,8 @@ namespace Microsoft.CodeAnalysis.Editor.Commands
[
ExcludeFromCodeCoverage
]
internal
class
CutCommandArgs
:
CommandArgs
{
public
CutCommandArgs
(
ITextView
textView
,
ITextBuffer
subjectBuffer
)
:
base
(
textView
,
subjectBuffer
)
public
CutCommandArgs
(
ITextView
textView
,
ITextBuffer
subjectBuffer
)
:
base
(
textView
,
subjectBuffer
)
{
}
}
...
...
src/EditorFeatures/TestUtilities/BraceHighlighting/MultiCharacterBraceHighlightingTests.cs
浏览文件 @
2732b85f
...
...
@@ -29,7 +29,7 @@ private ImmutableArray<TextSpan> GetSpans(BraceMatchingResult? result)
private
class
TestBraceMatchingService
:
IBraceMatchingService
{
public
async
Task
<
BraceMatchingResult
?>
GetMatchingBracesAsync
(
Document
document
,
int
position
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
Document
document
,
int
position
,
CancellationToken
cancellationToken
=
default
)
{
var
text
=
(
await
document
.
GetTextAsync
(
cancellationToken
)).
ToString
();
var
braces
=
GetMatchingBraces
(
text
,
position
);
...
...
src/EditorFeatures/TestUtilities/Diagnostics/AbstractUserDiagnosticTest.cs
浏览文件 @
2732b85f
...
...
@@ -337,7 +337,7 @@ protected Document GetDocumentAndAnnotatedSpan(TestWorkspace workspace, out stri
string
projectName
=
null
,
bool
isNewFile
=
false
,
string
existingFilename
=
null
,
ImmutableArray
<
string
>
newFileFolderContainers
=
default
(
ImmutableArray
<
string
>)
,
ImmutableArray
<
string
>
newFileFolderContainers
=
default
,
string
fullFilePath
=
null
,
string
newFileName
=
null
,
string
assertClassName
=
null
,
...
...
src/EditorFeatures/TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
浏览文件 @
2732b85f
...
...
@@ -125,7 +125,7 @@ public Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document docume
public
Task
<
IEnumerable
<
Diagnostic
>>
GetProjectDiagnosticsAsync
(
Project
project
)
{
return
GetDiagnosticsAsync
(
project
,
document
:
null
,
span
:
default
(
TextSpan
)
,
getDocumentDiagnostics
:
false
,
getProjectDiagnostics
:
true
);
return
GetDiagnosticsAsync
(
project
,
document
:
null
,
span
:
default
,
getDocumentDiagnostics
:
false
,
getProjectDiagnostics
:
true
);
}
private
async
Task
SynchronizeGlobalAssetToRemoteHostIfNeededAsync
(
Workspace
workspace
)
...
...
src/EditorFeatures/TestUtilities/EditAndContinue/ActiveStatementsDescription.cs
浏览文件 @
2732b85f
...
...
@@ -206,7 +206,7 @@ public static void EnsureSlot<T>(List<T> list, int i)
{
while
(
i
>=
list
.
Count
)
{
list
.
Add
(
default
(
T
)
);
list
.
Add
(
default
);
}
}
}
...
...
src/EditorFeatures/TestUtilities/EditAndContinue/DeclaratorMapDescription.cs
浏览文件 @
2732b85f
...
...
@@ -73,7 +73,7 @@ private static void EnsureSlot<T>(List<T> list, int i)
{
while
(
i
>=
list
.
Count
)
{
list
.
Add
(
default
(
T
)
);
list
.
Add
(
default
);
}
}
}
...
...
src/EditorFeatures/TestUtilities/EditAndContinue/EditAndContinueTestHelpers.cs
浏览文件 @
2732b85f
...
...
@@ -190,7 +190,7 @@ internal abstract class EditAndContinueTestHelpers
triviaEdits
,
actualLineEdits
,
diagnostics
,
default
(
CancellationToken
)
);
default
);
diagnostics
.
Verify
(
newSource
,
expectedDiagnostics
);
...
...
src/EditorFeatures/TestUtilities/EditAndContinue/Extensions.cs
浏览文件 @
2732b85f
...
...
@@ -21,7 +21,7 @@ private static IEnumerable<RudeEditDiagnosticDescription> ToDescription(this IEn
{
return
diagnostics
.
Select
(
d
=>
new
RudeEditDiagnosticDescription
(
d
.
Kind
,
d
.
Span
==
default
(
TextSpan
)
?
null
:
newSource
.
Substring
(
d
.
Span
.
Start
,
d
.
Span
.
Length
),
d
.
Span
==
default
?
null
:
newSource
.
Substring
(
d
.
Span
.
Start
,
d
.
Span
.
Length
),
d
.
Arguments
,
firstLine
:
includeFirstLines
?
GetLineAt
(
newSource
,
d
.
Span
.
Start
)
:
null
));
}
...
...
src/EditorFeatures/TestUtilities/MoveType/AbstractMoveTypeTest.cs
浏览文件 @
2732b85f
...
...
@@ -137,7 +137,7 @@ protected override CodeRefactoringProvider CreateCodeRefactoringProvider(Workspa
string
expectedSourceTextAfterRefactoring
,
string
expectedDocumentName
,
string
destinationDocumentText
,
ImmutableArray
<
string
>
destinationDocumentContainers
=
default
(
ImmutableArray
<
string
>)
,
ImmutableArray
<
string
>
destinationDocumentContainers
=
default
,
bool
expectedCodeAction
=
true
,
int
index
=
0
,
Action
<
Workspace
>
onAfterWorkspaceCreated
=
null
)
...
...
src/EditorFeatures/TestUtilities/Squiggles/AbstractSquiggleProducerTests.cs
浏览文件 @
2732b85f
...
...
@@ -104,7 +104,7 @@ public void RaiseDiagnosticsUpdated(DiagnosticsUpdatedArgs args)
public
bool
SupportGetDiagnostics
=>
false
;
public
ImmutableArray
<
DiagnosticData
>
GetDiagnostics
(
Workspace
workspace
,
ProjectId
projectId
,
DocumentId
documentId
,
object
id
,
bool
includeSuppressedDiagnostics
=
false
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
ImmutableArray
<
DiagnosticData
>
GetDiagnostics
(
Workspace
workspace
,
ProjectId
projectId
,
DocumentId
documentId
,
object
id
,
bool
includeSuppressedDiagnostics
=
false
,
CancellationToken
cancellationToken
=
default
)
{
return
includeSuppressedDiagnostics
?
_diagnostics
:
_diagnostics
.
WhereAsArray
(
d
=>
!
d
.
IsSuppressed
);
}
...
...
src/EditorFeatures/TestUtilities/Workspaces/NoCompilationDocumentDiagnosticAnalyzer.cs
浏览文件 @
2732b85f
...
...
@@ -26,7 +26,7 @@ public override Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(Document
public
override
Task
<
ImmutableArray
<
Diagnostic
>>
AnalyzeSyntaxAsync
(
Document
document
,
CancellationToken
cancellationToken
)
{
return
Task
.
FromResult
(
ImmutableArray
.
Create
(
Diagnostic
.
Create
(
Descriptor
,
Location
.
Create
(
document
.
FilePath
,
default
(
TextSpan
),
default
(
LinePositionSpan
)
))));
Diagnostic
.
Create
(
Descriptor
,
Location
.
Create
(
document
.
FilePath
,
default
,
default
))));
}
}
}
src/EditorFeatures/TestUtilities/Workspaces/TestForegroundNotificationService.cs
浏览文件 @
2732b85f
...
...
@@ -15,12 +15,12 @@ internal class TestForegroundNotificationService : IForegroundNotificationServic
private
readonly
List
<
Task
>
_tasks
=
new
List
<
Task
>();
private
readonly
SimpleTaskQueue
_queue
=
new
SimpleTaskQueue
(
TaskScheduler
.
Default
);
public
void
RegisterNotification
(
Func
<
bool
>
action
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
void
RegisterNotification
(
Func
<
bool
>
action
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
)
{
RegisterNotification
(
action
,
0
,
asyncToken
,
cancellationToken
);
}
public
void
RegisterNotification
(
Func
<
bool
>
action
,
int
delayInMS
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
void
RegisterNotification
(
Func
<
bool
>
action
,
int
delayInMS
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
)
{
Task
task
;
lock
(
_gate
)
...
...
@@ -44,12 +44,12 @@ private void Execute_NoLock(Func<bool> action, IAsyncToken asyncToken, Cancellat
}
}
public
void
RegisterNotification
(
Action
action
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
void
RegisterNotification
(
Action
action
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
)
{
RegisterNotification
(
action
,
0
,
asyncToken
,
cancellationToken
);
}
public
void
RegisterNotification
(
Action
action
,
int
delayInMS
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
public
void
RegisterNotification
(
Action
action
,
int
delayInMS
,
IAsyncToken
asyncToken
,
CancellationToken
cancellationToken
=
default
)
{
Task
task
;
lock
(
_gate
)
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestFormattingRuleFactoryServiceFactory.cs
浏览文件 @
2732b85f
...
...
@@ -27,7 +27,7 @@ public IWorkspaceService CreateService(HostWorkspaceServices workspaceServices)
public
sealed
class
Factory
:
IHostDependentFormattingRuleFactoryService
{
public
int
BaseIndentation
=
0
;
public
TextSpan
TextSpan
=
default
(
TextSpan
)
;
public
TextSpan
TextSpan
=
default
;
public
bool
UseBaseIndentation
=
false
;
public
bool
ShouldUseBaseIndentation
(
Document
document
)
...
...
src/EditorFeatures/TestUtilities/Workspaces/TestWorkspace_XmlConsumption.cs
浏览文件 @
2732b85f
...
...
@@ -41,7 +41,7 @@ public partial class TestWorkspace
private
class
TestDocumentationProvider
:
DocumentationProvider
{
protected
override
string
GetDocumentationForSymbol
(
string
documentationMemberID
,
CultureInfo
preferredCulture
,
CancellationToken
cancellationToken
=
default
(
CancellationToken
)
)
protected
override
string
GetDocumentationForSymbol
(
string
documentationMemberID
,
CultureInfo
preferredCulture
,
CancellationToken
cancellationToken
=
default
)
{
return
string
.
Format
(
"<member name='{0}'><summary>{0}</summary></member>"
,
documentationMemberID
);
}
...
...
@@ -143,7 +143,7 @@ public static TestWorkspace Create(string xmlDefinition, bool completed = true,
var
aliases
=
projectReference
.
Attributes
(
AliasAttributeName
).
Select
(
a
=>
a
.
Value
).
ToImmutableArray
();
workspace
.
OnProjectReferenceAdded
(
fromProject
.
Id
,
new
ProjectReference
(
toProject
.
Id
,
aliases
.
Any
()
?
aliases
:
default
(
ImmutableArray
<
string
>)
));
workspace
.
OnProjectReferenceAdded
(
fromProject
.
Id
,
new
ProjectReference
(
toProject
.
Id
,
aliases
.
Any
()
?
aliases
:
default
));
}
}
...
...
@@ -786,7 +786,7 @@ private static MetadataReference CreateMetadataReferenceFromSource(TestWorkspace
var
compilation
=
CreateCompilation
(
workspace
,
referencedSource
);
var
aliasElement
=
referencedSource
.
Attribute
(
"Aliases"
)?.
Value
;
var
aliases
=
aliasElement
!=
null
?
aliasElement
.
Split
(
','
).
Select
(
s
=>
s
.
Trim
()).
ToImmutableArray
()
:
default
(
ImmutableArray
<
string
>)
;
var
aliases
=
aliasElement
!=
null
?
aliasElement
.
Split
(
','
).
Select
(
s
=>
s
.
Trim
()).
ToImmutableArray
()
:
default
;
bool
includeXmlDocComments
=
false
;
var
includeXmlDocCommentsAttribute
=
referencedSource
.
Attribute
(
IncludeXmlDocCommentsAttributeName
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录