Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
94ee71e0
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,发现更多精彩内容 >>
提交
94ee71e0
编写于
6月 28, 2019
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use simple usings
上级
4226d8ce
变更
19
显示空白变更内容
内联
并排
Showing
19 changed file
with
210 addition
and
231 deletion
+210
-231
src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs
...tomaticCompletion/Sessions/CurlyBraceCompletionSession.cs
+9
-10
src/EditorFeatures/Core.Wpf/Options/LegacyEditorConfigDocumentOptionsProvider.cs
....Wpf/Options/LegacyEditorConfigDocumentOptionsProvider.cs
+3
-4
src/EditorFeatures/Core/Implementation/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
...ticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
+11
-12
src/EditorFeatures/Core/Implementation/BlockCommentEditing/BaseAbstractBlockCommentEditingCommandHandler.cs
...tEditing/BaseAbstractBlockCommentEditingCommandHandler.cs
+7
-8
src/EditorFeatures/Core/Implementation/DocumentationComments/AbstractXmlTagCompletionCommandHandler.cs
...ntationComments/AbstractXmlTagCompletionCommandHandler.cs
+8
-9
src/EditorFeatures/Core/Implementation/EditAndContinue/ReadOnlyDocumentTracker.cs
...Implementation/EditAndContinue/ReadOnlyDocumentTracker.cs
+4
-5
src/EditorFeatures/Core/Implementation/EncapsulateField/AbstractEncapsulateFieldCommandHandler.cs
...ncapsulateField/AbstractEncapsulateFieldCommandHandler.cs
+3
-4
src/EditorFeatures/Core/Implementation/ExtractMethod/AbstractExtractMethodCommandHandler.cs
...tion/ExtractMethod/AbstractExtractMethodCommandHandler.cs
+7
-8
src/EditorFeatures/Core/Implementation/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs
...g/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs
+22
-23
src/EditorFeatures/Core/Implementation/TodoComment/TodoCommentState.cs
...tures/Core/Implementation/TodoComment/TodoCommentState.cs
+17
-18
src/VisualStudio/CSharp/Impl/CodeModel/MethodXml/MethodXmlBuilder.cs
...tudio/CSharp/Impl/CodeModel/MethodXml/MethodXmlBuilder.cs
+5
-6
src/VisualStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
...alStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
+11
-12
src/VisualStudio/CSharp/Test/Debugging/NameResolverTests.cs
src/VisualStudio/CSharp/Test/Debugging/NameResolverTests.cs
+5
-6
src/VisualStudio/CSharp/Test/EventHookup/EventHookupCommandHandlerTests.cs
...CSharp/Test/EventHookup/EventHookupCommandHandlerTests.cs
+11
-12
src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs
...Studio/Core/Def/Implementation/Venus/ContainedDocument.cs
+40
-41
src/VisualStudio/Core/Impl/CodeModel/MethodXml/AbstractMethodXmlBuilder.cs
...Core/Impl/CodeModel/MethodXml/AbstractMethodXmlBuilder.cs
+3
-4
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs
...bols/Declarations/DeclarationFinder_SourceDeclarations.cs
+22
-25
src/Workspaces/Remote/ServiceHub/Services/CodeAnalysisService_SymbolFinder.cs
...e/ServiceHub/Services/CodeAnalysisService_SymbolFinder.cs
+5
-6
src/Workspaces/Remote/ServiceHub/Services/SnapshotService.JsonRpcAssetSource.cs
...ServiceHub/Services/SnapshotService.JsonRpcAssetSource.cs
+17
-18
未找到文件。
src/EditorFeatures/CSharp/AutomaticCompletion/Sessions/CurlyBraceCompletionSession.cs
浏览文件 @
94ee71e0
...
...
@@ -60,8 +60,8 @@ public override void AfterReturn(IBraceCompletionSession session, CancellationTo
// alright, it is in right shape.
var
undoHistory
=
GetUndoHistory
(
session
.
TextView
);
using
(
var
transaction
=
undoHistory
.
CreateTransaction
(
EditorFeaturesResources
.
Brace_Completion
))
{
using
var
transaction
=
undoHistory
.
CreateTransaction
(
EditorFeaturesResources
.
Brace_Completion
);
var
document
=
session
.
SubjectBuffer
.
CurrentSnapshot
.
GetOpenDocumentInCurrentContextWithChanges
();
if
(
document
!=
null
)
{
...
...
@@ -74,7 +74,6 @@ public override void AfterReturn(IBraceCompletionSession session, CancellationTo
transaction
.
Complete
();
}
}
}
private
static
bool
ContainsOnlyWhitespace
(
IBraceCompletionSession
session
)
{
...
...
src/EditorFeatures/Core.Wpf/Options/LegacyEditorConfigDocumentOptionsProvider.cs
浏览文件 @
94ee71e0
...
...
@@ -179,12 +179,11 @@ public async Task<IDocumentOptions> GetOptionsForDocumentAsync(Document document
// as in some builds the ICodingConventionsManager captures the thread pool.
var
conventionsAsync
=
Task
.
Run
(()
=>
GetConventionContextAsync
(
path
,
cancellationToken
));
using
(
var
context
=
await
conventionsAsync
.
ConfigureAwait
(
false
))
{
using
var
context
=
await
conventionsAsync
.
ConfigureAwait
(
false
);
return
new
DocumentOptions
(
context
.
CurrentConventions
,
_errorLogger
);
}
}
}
private
Task
<
ICodingConventionContext
>
GetConventionContextAsync
(
string
path
,
CancellationToken
cancellationToken
)
{
...
...
src/EditorFeatures/Core/Implementation/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
浏览文件 @
94ee71e0
...
...
@@ -111,8 +111,8 @@ public void ExecuteCommand(AutomaticLineEnderCommandArgs args, Action nextHandle
return
;
}
using
(
var
transaction
=
args
.
TextView
.
CreateEditTransaction
(
EditorFeaturesResources
.
Automatic_Line_Ender
,
_undoRegistry
,
_editorOperationsFactoryService
))
{
using
var
transaction
=
args
.
TextView
.
CreateEditTransaction
(
EditorFeaturesResources
.
Automatic_Line_Ender
,
_undoRegistry
,
_editorOperationsFactoryService
);
// try to move the caret to the end of the line on which the caret is
args
.
TextView
.
TryMoveCaretToAndEnsureVisible
(
subjectLineWhereCaretIsOn
.
End
);
...
...
@@ -128,7 +128,6 @@ public void ExecuteCommand(AutomaticLineEnderCommandArgs args, Action nextHandle
transaction
.
Complete
();
}
}
}
/// <summary>
/// return insertion point for the ending string
...
...
src/EditorFeatures/Core/Implementation/BlockCommentEditing/BaseAbstractBlockCommentEditingCommandHandler.cs
浏览文件 @
94ee71e0
...
...
@@ -47,8 +47,8 @@ protected bool TryHandleReturnKey(ITextBuffer subjectBuffer, ITextView textView)
return
false
;
}
using
(
var
transaction
=
_undoHistoryRegistry
.
GetHistory
(
textView
.
TextBuffer
).
CreateTransaction
(
EditorFeaturesResources
.
Insert_new_line
))
{
using
var
transaction
=
_undoHistoryRegistry
.
GetHistory
(
textView
.
TextBuffer
).
CreateTransaction
(
EditorFeaturesResources
.
Insert_new_line
);
var
editorOperations
=
_editorOperationsFactoryService
.
GetEditorOperations
(
textView
);
editorOperations
.
InsertNewLine
();
...
...
@@ -57,7 +57,6 @@ protected bool TryHandleReturnKey(ITextBuffer subjectBuffer, ITextView textView)
transaction
.
Complete
();
return
true
;
}
}
protected
abstract
string
GetExteriorTextForNextLine
(
SnapshotPoint
caretPosition
);
}
...
...
src/EditorFeatures/Core/Implementation/DocumentationComments/AbstractXmlTagCompletionCommandHandler.cs
浏览文件 @
94ee71e0
...
...
@@ -67,8 +67,8 @@ public void ExecuteCommand(TypeCharCommandArgs args, Action nextHandler, Command
protected
void
InsertTextAndMoveCaret
(
ITextView
textView
,
ITextBuffer
subjectBuffer
,
SnapshotPoint
position
,
string
insertionText
,
int
?
finalCaretPosition
)
{
using
(
var
transaction
=
_undoHistory
.
GetHistory
(
textView
.
TextBuffer
).
CreateTransaction
(
"XmlTagCompletion"
))
{
using
var
transaction
=
_undoHistory
.
GetHistory
(
textView
.
TextBuffer
).
CreateTransaction
(
"XmlTagCompletion"
);
subjectBuffer
.
Insert
(
position
,
insertionText
);
if
(
finalCaretPosition
.
HasValue
)
...
...
@@ -80,5 +80,4 @@ protected void InsertTextAndMoveCaret(ITextView textView, ITextBuffer subjectBuf
transaction
.
Complete
();
}
}
}
}
src/EditorFeatures/Core/Implementation/EditAndContinue/ReadOnlyDocumentTracker.cs
浏览文件 @
94ee71e0
...
...
@@ -112,12 +112,11 @@ private void RemoveReadOnlyRegionFromBuffer(DocumentId documentId, IReadOnlyRegi
AssertIsForeground
();
var
textBuffer
=
GetTextBuffer
(
_workspace
,
documentId
);
using
(
var
readOnlyEdit
=
textBuffer
.
CreateReadOnlyRegionEdit
())
{
using
var
readOnlyEdit
=
textBuffer
.
CreateReadOnlyRegionEdit
();
readOnlyEdit
.
RemoveReadOnlyRegion
(
region
);
readOnlyEdit
.
Apply
();
}
}
private
static
ITextBuffer
GetTextBuffer
(
Workspace
workspace
,
DocumentId
documentId
)
{
...
...
src/EditorFeatures/Core/Implementation/EncapsulateField/AbstractEncapsulateFieldCommandHandler.cs
浏览文件 @
94ee71e0
...
...
@@ -42,11 +42,10 @@ public bool ExecuteCommand(EncapsulateFieldCommandArgs args, CommandExecutionCon
return
false
;
}
using
(
var
waitScope
=
context
.
OperationContext
.
AddScope
(
allowCancellation
:
true
,
EditorFeaturesResources
.
Applying_Encapsulate_Field_refactoring
))
{
using
var
waitScope
=
context
.
OperationContext
.
AddScope
(
allowCancellation
:
true
,
EditorFeaturesResources
.
Applying_Encapsulate_Field_refactoring
);
return
Execute
(
args
,
waitScope
);
}
}
private
bool
Execute
(
EncapsulateFieldCommandArgs
args
,
IUIThreadOperationScope
waitScope
)
{
...
...
src/EditorFeatures/Core/Implementation/ExtractMethod/AbstractExtractMethodCommandHandler.cs
浏览文件 @
94ee71e0
...
...
@@ -238,8 +238,8 @@ private bool TryNotifyFailureToUser(Document document, ExtractMethodResult resul
/// </summary>
private
void
ApplyChangesToBuffer
(
ExtractMethodResult
extractMethodResult
,
ITextBuffer
subjectBuffer
,
CancellationToken
cancellationToken
)
{
using
(
var
undoTransaction
=
_undoManager
.
GetTextBufferUndoManager
(
subjectBuffer
).
TextBufferUndoHistory
.
CreateTransaction
(
"Extract Method"
))
{
using
var
undoTransaction
=
_undoManager
.
GetTextBufferUndoManager
(
subjectBuffer
).
TextBufferUndoHistory
.
CreateTransaction
(
"Extract Method"
);
// apply extract method code to buffer
var
document
=
extractMethodResult
.
Document
;
document
.
Project
.
Solution
.
Workspace
.
ApplyDocumentChanges
(
document
,
cancellationToken
);
...
...
@@ -248,5 +248,4 @@ private void ApplyChangesToBuffer(ExtractMethodResult extractMethodResult, IText
undoTransaction
.
Complete
();
}
}
}
}
src/EditorFeatures/Core/Implementation/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCommitter.cs
浏览文件 @
94ee71e0
...
...
@@ -262,9 +262,9 @@ private void UpdateWorkspaceForResetOfTypedIdentifier(Workspace workspace, Solut
var
undoHistory
=
_undoHistoryRegistry
.
RegisterHistory
(
_stateMachine
.
Buffer
);
using
(
var
workspaceUndoTransaction
=
workspace
.
OpenGlobalUndoTransaction
(
undoName
))
using
(
var
localUndoTransaction
=
undoHistory
.
CreateTransaction
(
undoName
))
{
using
var
workspaceUndoTransaction
=
workspace
.
OpenGlobalUndoTransaction
(
undoName
);
using
var
localUndoTransaction
=
undoHistory
.
CreateTransaction
(
undoName
);
var
undoPrimitiveBefore
=
new
UndoPrimitive
(
_stateMachine
.
Buffer
,
trackingSessionId
,
shouldRestoreStateOnUndo
:
false
);
localUndoTransaction
.
AddUndo
(
undoPrimitiveBefore
);
...
...
@@ -291,5 +291,4 @@ private void UpdateWorkspaceForResetOfTypedIdentifier(Workspace workspace, Solut
}
}
}
}
}
src/EditorFeatures/Core/Implementation/TodoComment/TodoCommentState.cs
浏览文件 @
94ee71e0
...
...
@@ -48,8 +48,8 @@ protected override Data TryGetExistingData(Stream stream, Document value, Cancel
protected
override
void
WriteTo
(
Stream
stream
,
Data
data
,
CancellationToken
cancellationToken
)
{
using
(
var
writer
=
new
ObjectWriter
(
stream
,
cancellationToken
:
cancellationToken
))
{
using
var
writer
=
new
ObjectWriter
(
stream
,
cancellationToken
:
cancellationToken
);
writer
.
WriteString
(
FormatVersion
);
data
.
TextVersion
.
WriteTo
(
writer
);
data
.
SyntaxVersion
.
WriteTo
(
writer
);
...
...
@@ -72,7 +72,6 @@ protected override void WriteTo(Stream stream, Data data, CancellationToken canc
writer
.
WriteInt32
(
item
.
MappedColumn
);
}
}
}
public
ImmutableArray
<
DocumentId
>
GetDocumentIds
()
{
...
...
src/VisualStudio/CSharp/Impl/CodeModel/MethodXml/MethodXmlBuilder.cs
浏览文件 @
94ee71e0
...
...
@@ -42,8 +42,8 @@ private void GenerateComments(SyntaxTriviaList triviaList)
var
firstNonWhitespacePosition
=
line
.
GetFirstNonWhitespacePosition
()
??
-
1
;
if
(
firstNonWhitespacePosition
==
trivia
.
SpanStart
)
{
using
(
var
tag
=
CommentTag
())
{
using
var
tag
=
CommentTag
();
// Skip initial slashes
var
trimmedComment
=
trivia
.
ToString
().
Substring
(
2
);
EncodedText
(
trimmedComment
);
...
...
@@ -51,7 +51,6 @@ private void GenerateComments(SyntaxTriviaList triviaList)
}
}
}
}
private
void
GenerateStatement
(
StatementSyntax
statement
)
{
...
...
src/VisualStudio/CSharp/Test/Debugging/LocationInfoGetterTests.cs
浏览文件 @
94ee71e0
...
...
@@ -17,8 +17,8 @@ public class LocationInfoGetterTests
{
private
async
Task
TestAsync
(
string
markup
,
string
expectedName
,
int
expectedLineOffset
,
CSharpParseOptions
parseOptions
=
null
)
{
using
(
var
workspace
=
TestWorkspace
.
CreateCSharp
(
markup
,
parseOptions
))
{
using
var
workspace
=
TestWorkspace
.
CreateCSharp
(
markup
,
parseOptions
);
var
testDocument
=
workspace
.
Documents
.
Single
();
var
position
=
testDocument
.
CursorPosition
.
Value
;
var
locationInfo
=
await
LocationInfoGetter
.
GetInfoAsync
(
...
...
@@ -29,7 +29,6 @@ private async Task TestAsync(string markup, string expectedName, int expectedLin
Assert
.
Equal
(
expectedName
,
locationInfo
.
Name
);
Assert
.
Equal
(
expectedLineOffset
,
locationInfo
.
LineOffset
);
}
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingLocationName
)]
public
async
Task
TestClass
()
...
...
src/VisualStudio/CSharp/Test/Debugging/NameResolverTests.cs
浏览文件 @
94ee71e0
...
...
@@ -27,13 +27,12 @@ private async Task TestAsync(string text, string searchText, params string[] exp
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingNameResolver
)]
public
async
Task
TestCSharpLanguageDebugInfoCreateNameResolver
()
{
using
(
var
workspace
=
TestWorkspace
.
CreateCSharp
(
" "
))
{
using
var
workspace
=
TestWorkspace
.
CreateCSharp
(
" "
);
var
debugInfo
=
new
CSharpBreakpointResolutionService
();
var
results
=
await
debugInfo
.
ResolveBreakpointsAsync
(
workspace
.
CurrentSolution
,
"goo"
,
CancellationToken
.
None
);
Assert
.
Equal
(
0
,
results
.
Count
());
}
}
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
DebuggingNameResolver
)]
public
async
Task
TestSimpleNameInClass
()
...
...
src/VisualStudio/CSharp/Test/EventHookup/EventHookupCommandHandlerTests.cs
浏览文件 @
94ee71e0
...
...
@@ -337,8 +337,8 @@ void M()
MyEvent +$$
}
}"
;
using
(
var
testState
=
EventHookupTestState
.
CreateTestState
(
markup
))
{
using
var
testState
=
EventHookupTestState
.
CreateTestState
(
markup
);
testState
.
SendTypeChar
(
'='
);
await
testState
.
WaitForAsynchronousOperationsAsync
();
testState
.
AssertShowing
(
"C_MyEvent;"
);
...
...
@@ -351,7 +351,6 @@ void M()
await
testState
.
WaitForAsynchronousOperationsAsync
();
testState
.
AssertNotShowing
();
}
}
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
EventHookup
)]
public
async
Task
EventHookupBeforeEventHookup
()
...
...
src/VisualStudio/Core/Def/Implementation/Venus/ContainedDocument.cs
浏览文件 @
94ee71e0
...
...
@@ -248,8 +248,8 @@ private IEnumerable<TextChange> FilterTextChanges(SourceText originalText, List<
yield
break
;
}
using
(
var
pooledObject
=
SharedPools
.
Default
<
List
<
TextChange
>>().
GetPooledObject
())
{
using
var
pooledObject
=
SharedPools
.
Default
<
List
<
TextChange
>>().
GetPooledObject
();
var
changeQueue
=
pooledObject
.
Object
;
changeQueue
.
AddRange
(
changes
);
...
...
@@ -305,7 +305,6 @@ private IEnumerable<TextChange> FilterTextChanges(SourceText originalText, List<
}
}
}
}
private
bool
WhitespaceOnEdges
(
SourceText
text
,
TextSpan
visibleTextSpan
,
TextChange
change
)
{
...
...
src/VisualStudio/Core/Impl/CodeModel/MethodXml/AbstractMethodXmlBuilder.cs
浏览文件 @
94ee71e0
...
...
@@ -465,11 +465,10 @@ protected void GenerateType(ITypeSymbol type, bool? @implicit = null, bool assem
if
(
type
.
TypeKind
==
TypeKind
.
Array
)
{
var
arrayType
=
(
IArrayTypeSymbol
)
type
;
using
(
var
tag
=
ArrayTypeTag
(
arrayType
.
Rank
))
{
using
var
tag
=
ArrayTypeTag
(
arrayType
.
Rank
);
GenerateType
(
arrayType
.
ElementType
,
@implicit
,
assemblyQualify
);
}
}
else
{
using
(
TypeTag
(
@implicit
))
...
...
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs
浏览文件 @
94ee71e0
...
...
@@ -248,13 +248,12 @@ internal static partial class DeclarationFinder
{
var
list
=
ArrayBuilder
<
SymbolAndProjectId
>.
GetInstance
();
using
(
var
query
=
SearchQuery
.
Create
(
name
,
ignoreCase
))
{
using
var
query
=
SearchQuery
.
Create
(
name
,
ignoreCase
);
await
AddCompilationDeclarationsWithNormalQueryAsync
(
project
,
query
,
filter
,
list
,
cancellationToken
).
ConfigureAwait
(
false
);
return
list
.
ToImmutableAndFree
();
}
}
private
static
async
Task
<
ImmutableArray
<
SymbolAndProjectId
>>
FindSourceDeclarationsWithPatternInCurrentProcessAsync
(
string
pattern
,
Func
<
SearchQuery
,
Task
<
ImmutableArray
<
SymbolAndProjectId
>>>
searchAsync
)
...
...
@@ -273,9 +272,9 @@ internal static partial class DeclarationFinder
// If we don't have a dot in the pattern, just make a pattern matcher for the entire
// pattern they passed in. Otherwise, make a pattern matcher just for the part after
// the dot.
using
(
var
nameMatcher
=
PatternMatcher
.
CreatePatternMatcher
(
namePart
,
includeMatchedSpans
:
false
))
using
(
var
query
=
SearchQuery
.
CreateCustom
(
nameMatcher
.
Matches
))
{
using
var
nameMatcher
=
PatternMatcher
.
CreatePatternMatcher
(
namePart
,
includeMatchedSpans
:
false
);
using
var
query
=
SearchQuery
.
CreateCustom
(
nameMatcher
.
Matches
);
var
symbolAndProjectIds
=
await
searchAsync
(
query
).
ConfigureAwait
(
false
);
if
(
symbolAndProjectIds
.
Length
==
0
||
...
...
@@ -288,13 +287,11 @@ internal static partial class DeclarationFinder
// Ok, we had a dotted pattern. Have to see if the symbol's container matches the
// pattern as well.
using
(
var
containerPatternMatcher
=
PatternMatcher
.
CreateDotSeparatedContainerMatcher
(
containerPart
))
{
using
var
containerPatternMatcher
=
PatternMatcher
.
CreateDotSeparatedContainerMatcher
(
containerPart
);
return
symbolAndProjectIds
.
WhereAsArray
(
t
=>
containerPatternMatcher
.
Matches
(
GetContainer
(
t
.
Symbol
)));
}
}
}
internal
static
Task
<
ImmutableArray
<
SymbolAndProjectId
>>
FindSourceDeclarationsWithPatternInCurrentProcessAsync
(
Solution
solution
,
string
pattern
,
SymbolFilter
criteria
,
CancellationToken
cancellationToken
)
...
...
src/Workspaces/Remote/ServiceHub/Services/CodeAnalysisService_SymbolFinder.cs
浏览文件 @
94ee71e0
...
...
@@ -78,14 +78,13 @@ public Task FindLiteralReferencesAsync(object value, TypeCode typeCode, Cancella
var
solution
=
await
GetSolutionAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
var
project
=
solution
.
GetProject
(
projectId
);
using
(
var
query
=
SearchQuery
.
Create
(
name
,
searchKind
))
{
using
var
query
=
SearchQuery
.
Create
(
name
,
searchKind
);
var
result
=
await
DeclarationFinder
.
FindAllDeclarationsWithNormalQueryInCurrentProcessAsync
(
project
,
query
,
criteria
,
cancellationToken
).
ConfigureAwait
(
false
);
return
(
IList
<
SerializableSymbolAndProjectId
>)
result
.
SelectAsArray
(
SerializableSymbolAndProjectId
.
Dehydrate
);
}
}
},
cancellationToken
);
}
...
...
src/Workspaces/Remote/ServiceHub/Services/SnapshotService.JsonRpcAssetSource.cs
浏览文件 @
94ee71e0
...
...
@@ -83,8 +83,8 @@ private bool ReportUnlessCanceled(Exception ex, CancellationToken cancellationTo
{
var
results
=
new
List
<(
Checksum
,
object
)>();
using
(
var
reader
=
ObjectReader
.
TryGetReader
(
stream
,
cancellationToken
))
{
using
var
reader
=
ObjectReader
.
TryGetReader
(
stream
,
cancellationToken
);
Debug
.
Assert
(
reader
!=
null
,
@"We only ge a reader for data transmitted between live processes.
This data should always be correct as we're never persisting the data between sessions."
);
...
...
@@ -110,7 +110,6 @@ private bool ReportUnlessCanceled(Exception ex, CancellationToken cancellationTo
return
results
;
}
}
private
static
string
GetRequestLogInfo
(
int
serviceId
,
IEnumerable
<
Checksum
>
checksums
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录