Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4625654d
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,发现更多精彩内容 >>
提交
4625654d
编写于
12月 16, 2019
作者:
T
Tomas Matousek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make callbackTarget required parameter.
上级
fa4ada32
变更
27
隐藏空白更改
内联
并排
Showing
27 changed file
with
57 addition
and
24 deletion
+57
-24
src/EditorFeatures/Core.Wpf/SymbolSearch/SymbolSearchUpdateEngineFactory.cs
.../Core.Wpf/SymbolSearch/SymbolSearchUpdateEngineFactory.cs
+1
-1
src/EditorFeatures/TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
...TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
+1
-0
src/Features/Core/Portable/AddImport/AbstractAddImportFeatureService.cs
...ore/Portable/AddImport/AbstractAddImportFeatureService.cs
+2
-2
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.cs
...mpletionProvider/ExtensionMethodImportCompletionHelper.cs
+1
-0
src/Features/Core/Portable/DesignerAttributes/AbstractDesignerAttributeService.cs
...le/DesignerAttributes/AbstractDesignerAttributeService.cs
+1
-0
src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs
...icIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs
+2
-1
src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs
...neV2/DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs
+1
-0
src/Features/Core/Portable/DocumentHighlighting/AbstractDocumentHighlightsService.cs
...DocumentHighlighting/AbstractDocumentHighlightsService.cs
+1
-0
src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs
...re/Portable/NavigateTo/AbstractNavigateToSearchService.cs
+2
-0
src/Features/Core/Portable/TodoComments/AbstractTodoCommentService.cs
.../Core/Portable/TodoComments/AbstractTodoCommentService.cs
+3
-1
src/VisualStudio/Core/Def/Implementation/CodeLens/RemoteCodeLensReferencesService.cs
...mplementation/CodeLens/RemoteCodeLensReferencesService.cs
+4
-0
src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.RemoteHostClientService.cs
...RemoteHostClientServiceFactory.RemoteHostClientService.cs
+1
-0
src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.SolutionChecksumUpdater.cs
...RemoteHostClientServiceFactory.SolutionChecksumUpdater.cs
+5
-2
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
...e/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
+1
-1
src/VisualStudio/Core/Test.Next/Remote/RemoteHostClientServiceFactoryTests.cs
...e/Test.Next/Remote/RemoteHostClientServiceFactoryTests.cs
+2
-2
src/VisualStudio/Core/Test.Next/Services/LanguageServiceTests.cs
...ualStudio/Core/Test.Next/Services/LanguageServiceTests.cs
+1
-0
src/VisualStudio/Core/Test.Next/Services/ServiceHubServicesTests.cs
...Studio/Core/Test.Next/Services/ServiceHubServicesTests.cs
+5
-0
src/VisualStudio/Core/Test.Next/Services/VisualStudioDiagnosticAnalyzerExecutorTests.cs
...t/Services/VisualStudioDiagnosticAnalyzerExecutorTests.cs
+2
-0
src/VisualStudio/Razor/RazorLanguageServiceClient.cs
src/VisualStudio/Razor/RazorLanguageServiceClient.cs
+1
-1
src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs
...agnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs
+1
-0
src/Workspaces/Core/Portable/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClientWrapper.cs
...ess/UnitTesting/Api/UnitTestingRemoteHostClientWrapper.cs
+2
-2
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs
...Symbols/Declarations/DeclarationFinder_AllDeclarations.cs
+1
-0
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs
...bols/Declarations/DeclarationFinder_SourceDeclarations.cs
+4
-0
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindLiteralReferences.cs
...ortable/FindSymbols/SymbolFinder_FindLiteralReferences.cs
+2
-2
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Current.cs
...rtable/FindSymbols/SymbolFinder_FindReferences_Current.cs
+2
-2
src/Workspaces/Core/Portable/Remote/RemoteHostClient.cs
src/Workspaces/Core/Portable/Remote/RemoteHostClient.cs
+7
-7
src/Workspaces/Core/Portable/Remote/RemoteHostClientExtensions.cs
...spaces/Core/Portable/Remote/RemoteHostClientExtensions.cs
+1
-0
未找到文件。
src/EditorFeatures/Core.Wpf/SymbolSearch/SymbolSearchUpdateEngineFactory.cs
浏览文件 @
4625654d
...
...
@@ -28,7 +28,7 @@ internal static partial class SymbolSearchUpdateEngineFactory
if
(
client
!=
null
)
{
var
callbackObject
=
new
CallbackObject
(
logService
,
progressService
);
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
WellKnownServiceHubServices
.
RemoteSymbolSearchUpdateEngine
,
ca
ncellationToken
,
callbackObject
).
ConfigureAwait
(
false
);
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
WellKnownServiceHubServices
.
RemoteSymbolSearchUpdateEngine
,
ca
llbackObject
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
session
!=
null
)
{
return
new
RemoteUpdateEngine
(
workspace
,
session
);
...
...
src/EditorFeatures/TestUtilities/Diagnostics/TestDiagnosticAnalyzerDriver.cs
浏览文件 @
4625654d
...
...
@@ -145,6 +145,7 @@ private async Task SynchronizeGlobalAssetToRemoteHostIfNeededAsync(Workspace wor
nameof
(
IRemoteHostService
.
SynchronizeGlobalAssetsAsync
),
workspace
.
CurrentSolution
,
new
[]
{
(
object
)
checksums
},
callbackTarget
:
null
,
CancellationToken
.
None
).
ConfigureAwait
(
false
);
}
...
...
src/Features/Core/Portable/AddImport/AbstractAddImportFeatureService.cs
浏览文件 @
4625654d
...
...
@@ -71,8 +71,8 @@ internal abstract partial class AbstractAddImportFeatureService<TSimpleNameSynta
searchReferenceAssemblies
,
packageSources
},
ca
ncellationToken
,
ca
llbackTarget
).
ConfigureAwait
(
false
);
ca
llbackTarget
,
ca
ncellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
{
...
...
src/Features/Core/Portable/Completion/Providers/ImportCompletionProvider/ExtensionMethodImportCompletionHelper.cs
浏览文件 @
4625654d
...
...
@@ -50,6 +50,7 @@ async Task<(ImmutableArray<SerializableImportCompletionItem>, StatisticCounter)>
nameof
(
IRemoteExtensionMethodImportCompletionService
.
GetUnimportedExtensionMethodsAsync
),
project
.
Solution
,
new
object
[]
{
document
.
Id
,
position
,
SymbolKey
.
CreateString
(
receiverTypeSymbol
),
namespaceInScope
.
ToArray
(),
forceIndexCreation
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Features/Core/Portable/DesignerAttributes/AbstractDesignerAttributeService.cs
浏览文件 @
4625654d
...
...
@@ -46,6 +46,7 @@ public async Task<DesignerAttributeResult> ScanDesignerAttributesAsync(Document
nameof
(
IRemoteDesignerAttributeService
.
ScanDesignerAttributesAsync
),
document
.
Project
.
Solution
,
new
[]
{
document
.
Id
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs
浏览文件 @
4625654d
...
...
@@ -110,6 +110,7 @@ private async Task FireAndForgetReportAnalyzerPerformanceAsync(Project project,
// +1 for project itself
project
.
DocumentIds
.
Count
+
1
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
}
catch
(
Exception
ex
)
when
(
FatalError
.
ReportWithoutCrashUnlessCanceled
(
ex
))
...
...
@@ -139,7 +140,7 @@ private async Task FireAndForgetReportAnalyzerPerformanceAsync(Project project,
forcedAnalysis
,
analyzerDriver
.
AnalysisOptions
.
ReportSuppressedDiagnostics
,
analyzerDriver
.
AnalysisOptions
.
LogAnalyzerExecutionTime
,
project
.
Id
,
optionAsset
.
Checksum
,
analyzerMap
.
Keys
.
ToArray
());
using
var
session
=
await
client
.
TryCreateSessionAsync
(
WellKnownServiceHubServices
.
CodeAnalysisService
,
solution
,
cancellationToken
).
ConfigureAwait
(
false
);
using
var
session
=
await
client
.
TryCreateSessionAsync
(
WellKnownServiceHubServices
.
CodeAnalysisService
,
solution
,
ca
llbackTarget
:
null
,
ca
ncellationToken
).
ConfigureAwait
(
false
);
if
(
session
==
null
)
{
// session is not available
...
...
src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs
浏览文件 @
4625654d
...
...
@@ -540,6 +540,7 @@ private async Task ReportAnalyzerPerformanceAsync(Document document, Compilation
WellKnownServiceHubServices
.
CodeAnalysisService
,
nameof
(
IRemoteDiagnosticAnalyzerService
.
ReportAnalyzerPerformance
),
new
object
[]
{
pooledObject
.
Object
.
ToAnalyzerPerformanceInfo
(
AnalyzerService
),
/* unit count */
1
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
}
catch
(
Exception
ex
)
when
(
FatalError
.
ReportWithoutCrashUnlessCanceled
(
ex
))
...
...
src/Features/Core/Portable/DocumentHighlighting/AbstractDocumentHighlightsService.cs
浏览文件 @
4625654d
...
...
@@ -40,6 +40,7 @@ internal abstract partial class AbstractDocumentHighlightsService : IDocumentHig
position
,
documentsToSearch
.
Select
(
d
=>
d
.
Id
).
ToArray
()
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Features/Core/Portable/NavigateTo/AbstractNavigateToSearchService.cs
浏览文件 @
4625654d
...
...
@@ -41,6 +41,7 @@ internal abstract partial class AbstractNavigateToSearchService : INavigateToSea
nameof
(
IRemoteNavigateToSearchService
.
SearchDocumentAsync
),
solution
,
new
object
[]
{
document
.
Id
,
searchPattern
,
kinds
.
ToArray
()
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -66,6 +67,7 @@ internal abstract partial class AbstractNavigateToSearchService : INavigateToSea
nameof
(
IRemoteNavigateToSearchService
.
SearchProjectAsync
),
solution
,
new
object
[]
{
project
.
Id
,
priorityDocuments
.
Select
(
d
=>
d
.
Id
).
ToArray
(),
searchPattern
,
kinds
.
ToArray
()
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Features/Core/Portable/TodoComments/AbstractTodoCommentService.cs
浏览文件 @
4625654d
...
...
@@ -51,7 +51,9 @@ public async Task<IList<TodoComment>> GetTodoCommentsAsync(Document document, IL
WellKnownServiceHubServices
.
CodeAnalysisService
,
nameof
(
IRemoteTodoCommentService
.
GetTodoCommentsAsync
),
document
.
Project
.
Solution
,
new
object
[]
{
document
.
Id
,
commentDescriptors
},
cancellationToken
).
ConfigureAwait
(
false
);
new
object
[]
{
document
.
Id
,
commentDescriptors
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
{
...
...
src/VisualStudio/Core/Def/Implementation/CodeLens/RemoteCodeLensReferencesService.cs
浏览文件 @
4625654d
...
...
@@ -42,6 +42,7 @@ public RemoteCodeLensReferencesService()
nameof
(
IRemoteCodeLensReferencesService
.
GetReferenceCountAsync
),
solution
,
new
object
[]
{
documentId
,
syntaxNode
.
Span
,
maxSearchResults
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -88,6 +89,7 @@ public RemoteCodeLensReferencesService()
nameof
(
IRemoteCodeLensReferencesService
.
FindReferenceMethodsAsync
),
solution
,
new
object
[]
{
documentId
,
syntaxNode
.
Span
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -118,6 +120,7 @@ public RemoteCodeLensReferencesService()
nameof
(
IRemoteCodeLensReferencesService
.
GetFullyQualifiedName
),
solution
,
new
object
[]
{
documentId
,
syntaxNode
.
Span
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -251,6 +254,7 @@ private static string GetLineTextOrEmpty(TextLineCollection lines, int index)
nameof
(
IRemoteCodeLensReferencesService
.
FindReferenceLocationsAsync
),
solution
,
new
object
[]
{
documentId
,
syntaxNode
.
Span
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.RemoteHostClientService.cs
浏览文件 @
4625654d
...
...
@@ -210,6 +210,7 @@ private async Task<RemoteHostClient> EnableAsync(CancellationToken cancellationT
nameof
(
IRemoteHostService
.
SynchronizeGlobalAssetsAsync
),
_workspace
.
CurrentSolution
,
new
[]
{
(
object
)
checksums
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
success
)
...
...
src/VisualStudio/Core/Def/Implementation/Remote/RemoteHostClientServiceFactory.SolutionChecksumUpdater.cs
浏览文件 @
4625654d
...
...
@@ -184,8 +184,11 @@ private void PushTextChanges(Document oldDocument, Document newDocument)
var
state
=
await
oldDocument
.
State
.
GetStateChecksumsAsync
(
CancellationToken
).
ConfigureAwait
(
false
);
_
=
await
client
.
TryRunRemoteAsync
(
WellKnownRemoteHostServices
.
RemoteHostService
,
nameof
(
IRemoteHostService
.
SynchronizeTextAsync
),
new
object
[]
{
oldDocument
.
Id
,
state
.
Text
,
textChanges
},
CancellationToken
).
ConfigureAwait
(
false
);
WellKnownRemoteHostServices
.
RemoteHostService
,
nameof
(
IRemoteHostService
.
SynchronizeTextAsync
),
new
object
[]
{
oldDocument
.
Id
,
state
.
Text
,
textChanges
},
callbackTarget
:
null
,
CancellationToken
).
ConfigureAwait
(
false
);
},
CancellationToken
).
CompletesAsyncOperation
(
token
);
}
...
...
src/VisualStudio/Core/Def/Implementation/Remote/ServiceHubRemoteHostClient.cs
浏览文件 @
4625654d
...
...
@@ -40,7 +40,7 @@ private enum GlobalNotificationState
/// stop prior to hearing about the relevant start).
/// </summary>
private
readonly
object
_globalNotificationsGate
=
new
object
();
private
readonly
Task
<
GlobalNotificationState
>
_globalNotificationsTask
=
Task
.
FromResult
(
GlobalNotificationState
.
NotStarted
);
private
Task
<
GlobalNotificationState
>
_globalNotificationsTask
=
Task
.
FromResult
(
GlobalNotificationState
.
NotStarted
);
public
static
async
Task
<
ServiceHubRemoteHostClient
?>
CreateAsync
(
Workspace
workspace
,
CancellationToken
cancellationToken
)
{
...
...
src/VisualStudio/Core/Test.Next/Remote/RemoteHostClientServiceFactoryTests.cs
浏览文件 @
4625654d
...
...
@@ -157,7 +157,7 @@ public async Task TestSessionWithNoSolution()
var
mock
=
new
MockLogAndProgressService
();
var
client
=
await
service
.
TryGetRemoteHostClientAsync
(
CancellationToken
.
None
);
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
WellKnownServiceHubServices
.
RemoteSymbolSearchUpdateEngine
,
CancellationToken
.
None
,
mock
);
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
WellKnownServiceHubServices
.
RemoteSymbolSearchUpdateEngine
,
callbackTarget
:
mock
,
CancellationToken
.
None
);
var
result
=
await
session
.
TryInvokeAsync
(
nameof
(
IRemoteSymbolSearchUpdateEngine
.
UpdateContinuouslyAsync
),
new
object
[]
{
"emptySource"
,
Path
.
GetTempPath
()
},
CancellationToken
.
None
);
Assert
.
True
(
result
);
...
...
@@ -185,7 +185,7 @@ public async Task TestSessionClosed()
});
// create session that stay alive until client alive (ex, SymbolSearchUpdateEngine)
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
"Test"
,
CancellationToken
.
None
);
var
session
=
await
client
.
TryCreateKeepAliveSessionAsync
(
"Test"
,
callbackTarget
:
null
,
CancellationToken
.
None
);
// mimic unfortunate call that happens to be in the middle of communication.
var
task
=
session
.
TryInvokeAsync
(
"TestMethodAsync"
,
arguments
:
null
,
CancellationToken
.
None
);
...
...
src/VisualStudio/Core/Test.Next/Services/LanguageServiceTests.cs
浏览文件 @
4625654d
...
...
@@ -120,6 +120,7 @@ private async Task UpdatePrimaryWorkspace(InProcRemoteHostClient client, Solutio
nameof
(
IRemoteHostService
.
SynchronizePrimaryWorkspaceAsync
),
solution
,
new
object
[]
{
await
solution
.
State
.
GetChecksumAsync
(
CancellationToken
.
None
),
_solutionVersion
++
},
callbackTarget
:
null
,
CancellationToken
.
None
));
}
...
...
src/VisualStudio/Core/Test.Next/Services/ServiceHubServicesTests.cs
浏览文件 @
4625654d
...
...
@@ -106,6 +106,7 @@ public async Task TestRemoteHostTextSynchronize()
WellKnownRemoteHostServices
.
RemoteHostService
,
nameof
(
IRemoteHostService
.
SynchronizeTextAsync
),
new
object
[]
{
oldDocument
.
Id
,
oldState
.
Text
,
newText
.
GetTextChanges
(
oldText
)
},
callbackTarget
:
null
,
CancellationToken
.
None
);
// apply change to solution
...
...
@@ -134,6 +135,7 @@ public async Task TestTodoComments()
nameof
(
IRemoteTodoCommentService
.
GetTodoCommentsAsync
),
solution
,
new
object
[]
{
solution
.
Projects
.
First
().
DocumentIds
.
First
(),
ImmutableArray
.
Create
(
new
TodoCommentDescriptor
(
"TODO"
,
0
))
},
callbackTarget
:
null
,
CancellationToken
.
None
);
Assert
.
Equal
(
1
,
comments
.
Value
.
Count
);
...
...
@@ -157,6 +159,7 @@ class Test { }";
nameof
(
IRemoteDesignerAttributeService
.
ScanDesignerAttributesAsync
),
solution
,
new
[]
{
solution
.
Projects
.
First
().
DocumentIds
.
First
()
},
callbackTarget
:
null
,
CancellationToken
.
None
);
Assert
.
Equal
(
"Form"
,
result
.
Value
.
DesignerAttributeArgument
);
...
...
@@ -177,6 +180,7 @@ public async Task TestRemoteHostSynchronizeGlobalAssets()
nameof
(
IRemoteHostService
.
SynchronizeGlobalAssetsAsync
),
workspace
.
CurrentSolution
,
new
object
[]
{
new
Checksum
[
0
]
{
}
},
callbackTarget
:
null
,
CancellationToken
.
None
));
var
storage
=
client
.
AssetStorage
;
...
...
@@ -377,6 +381,7 @@ private async Task UpdatePrimaryWorkspace(InProcRemoteHostClient client, Solutio
nameof
(
IRemoteHostService
.
SynchronizePrimaryWorkspaceAsync
),
solution
,
new
object
[]
{
await
solution
.
State
.
GetChecksumAsync
(
CancellationToken
.
None
),
_solutionVersion
++
},
callbackTarget
:
null
,
CancellationToken
.
None
));
}
...
...
src/VisualStudio/Core/Test.Next/Services/VisualStudioDiagnosticAnalyzerExecutorTests.cs
浏览文件 @
4625654d
...
...
@@ -179,6 +179,7 @@ void Method()
nameof
(
IRemoteHostService
.
SynchronizeGlobalAssetsAsync
),
workspace
.
CurrentSolution
,
new
[]
{
new
Checksum
[]
{
asset
.
Checksum
}
},
callbackTarget
:
null
,
CancellationToken
.
None
));
// set option
...
...
@@ -234,6 +235,7 @@ void Method()
nameof
(
IRemoteHostService
.
SynchronizeGlobalAssetsAsync
),
workspace
.
CurrentSolution
,
new
[]
{
new
Checksum
[]
{
asset
.
Checksum
}
},
callbackTarget
:
null
,
CancellationToken
.
None
));
// run analysis
...
...
src/VisualStudio/Razor/RazorLanguageServiceClient.cs
浏览文件 @
4625654d
...
...
@@ -29,7 +29,7 @@ public async Task<Session> CreateSessionAsync(Solution solution, object callback
return
null
;
}
var
innerSession
=
await
_client
.
TryCreateSessionAsync
(
_serviceName
,
solution
,
ca
ncellationToken
,
callbackTarget
).
ConfigureAwait
(
false
);
var
innerSession
=
await
_client
.
TryCreateSessionAsync
(
_serviceName
,
solution
,
ca
llbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
innerSession
==
null
)
{
return
null
;
...
...
src/VisualStudio/VisualStudioDiagnosticsToolWindow/OptionPages/PerformanceLoggersPage.cs
浏览文件 @
4625654d
...
...
@@ -71,6 +71,7 @@ public static void SetLoggers(IGlobalOptionService optionService, IThreadingCont
WellKnownRemoteHostServices
.
RemoteHostService
,
nameof
(
IRemoteHostService
.
SetLoggingFunctionIds
),
new
object
[]
{
loggerTypes
,
functionIds
},
callbackTarget
:
null
,
CancellationToken
.
None
));
}
...
...
src/Workspaces/Core/Portable/ExternalAccess/UnitTesting/Api/UnitTestingRemoteHostClientWrapper.cs
浏览文件 @
4625654d
...
...
@@ -16,13 +16,13 @@ internal UnitTestingRemoteHostClientWrapper(RemoteHostClient underlyingObject)
public
async
Task
<
UnitTestingKeepAliveSessionWrapper
>
TryCreateUnitTestingKeepAliveSessionWrapperAsync
(
string
serviceName
,
CancellationToken
cancellationToken
)
{
var
keepAliveSession
=
await
UnderlyingObject
.
TryCreateKeepAliveSessionAsync
(
serviceName
,
cancellationToken
).
ConfigureAwait
(
false
);
var
keepAliveSession
=
await
UnderlyingObject
.
TryCreateKeepAliveSessionAsync
(
serviceName
,
ca
llbackTarget
:
null
,
ca
ncellationToken
).
ConfigureAwait
(
false
);
return
new
UnitTestingKeepAliveSessionWrapper
(
keepAliveSession
);
}
public
async
Task
<
UnitTestingSessionWithSolutionWrapper
>
TryCreateUnitingSessionWithSolutionWrapperAsync
(
string
serviceName
,
Solution
solution
,
CancellationToken
cancellationToken
)
{
var
session
=
await
UnderlyingObject
.
TryCreateSessionAsync
(
serviceName
,
solution
,
cancellationToken
).
ConfigureAwait
(
false
);
var
session
=
await
UnderlyingObject
.
TryCreateSessionAsync
(
serviceName
,
solution
,
ca
llbackTarget
:
null
,
ca
ncellationToken
).
ConfigureAwait
(
false
);
return
new
UnitTestingSessionWithSolutionWrapper
(
session
);
}
...
...
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_AllDeclarations.cs
浏览文件 @
4625654d
...
...
@@ -44,6 +44,7 @@ internal static partial class DeclarationFinder
nameof
(
IRemoteSymbolFinder
.
FindAllDeclarationsWithNormalQueryAsync
),
solution
,
new
object
[]
{
project
.
Id
,
query
.
Name
,
query
.
Kind
,
criteria
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Workspaces/Core/Portable/FindSymbols/Declarations/DeclarationFinder_SourceDeclarations.cs
浏览文件 @
4625654d
...
...
@@ -47,6 +47,7 @@ internal static partial class DeclarationFinder
nameof
(
IRemoteSymbolFinder
.
FindSolutionSourceDeclarationsWithNormalQueryAsync
),
solution
,
new
object
[]
{
name
,
ignoreCase
,
criteria
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -85,6 +86,7 @@ internal static partial class DeclarationFinder
nameof
(
IRemoteSymbolFinder
.
FindProjectSourceDeclarationsWithNormalQueryAsync
),
project
.
Solution
,
new
object
[]
{
project
.
Id
,
name
,
ignoreCase
,
criteria
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -119,6 +121,7 @@ internal static partial class DeclarationFinder
nameof
(
IRemoteSymbolFinder
.
FindSolutionSourceDeclarationsWithPatternAsync
),
solution
,
new
object
[]
{
pattern
,
criteria
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
@@ -152,6 +155,7 @@ internal static partial class DeclarationFinder
nameof
(
IRemoteSymbolFinder
.
FindProjectSourceDeclarationsWithPatternAsync
),
project
.
Solution
,
new
object
[]
{
project
.
Id
,
pattern
,
criteria
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
result
.
HasValue
)
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindLiteralReferences.cs
浏览文件 @
4625654d
...
...
@@ -32,8 +32,8 @@ public static partial class SymbolFinder
nameof
(
IRemoteSymbolFinder
.
FindLiteralReferencesAsync
),
solution
,
new
object
[]
{
value
,
typeCode
},
cancellationToken
,
serverCallback
).
ConfigureAwait
(
false
);
serverCallback
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
success
)
{
...
...
src/Workspaces/Core/Portable/FindSymbols/SymbolFinder_FindReferences_Current.cs
浏览文件 @
4625654d
...
...
@@ -49,8 +49,8 @@ public static partial class SymbolFinder
documents
?.
Select
(
d
=>
d
.
Id
).
ToArray
(),
SerializableFindReferencesSearchOptions
.
Dehydrate
(
options
),
},
cancellationToken
,
serverCallback
).
ConfigureAwait
(
false
);
serverCallback
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
success
)
{
...
...
src/Workspaces/Core/Portable/Remote/RemoteHostClient.cs
浏览文件 @
4625654d
...
...
@@ -102,7 +102,7 @@ public static string CreateClientId(string prefix)
/// <summary>
/// Creates <see cref="SessionWithSolution"/> for the <paramref name="serviceName"/> if possible, otherwise returns <see langword="null"/>.
/// </summary>
public
async
Task
<
SessionWithSolution
?>
TryCreateSessionAsync
(
string
serviceName
,
Solution
solution
,
CancellationToken
cancellationToken
,
object
?
callbackTarget
=
null
)
public
async
Task
<
SessionWithSolution
?>
TryCreateSessionAsync
(
string
serviceName
,
Solution
solution
,
object
?
callbackTarget
,
CancellationToken
cancellationToken
)
{
var
connection
=
await
TryCreateConnectionAsync
(
serviceName
,
callbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
connection
==
null
)
...
...
@@ -116,7 +116,7 @@ public static string CreateClientId(string prefix)
/// <summary>
/// Creates <see cref="KeepAliveSession"/> for the <paramref name="serviceName"/>, otherwise returns <see langword="null"/>.
/// </summary>
public
async
Task
<
KeepAliveSession
?>
TryCreateKeepAliveSessionAsync
(
string
serviceName
,
CancellationToken
cancellationToken
,
object
?
callbackTarget
=
null
)
public
async
Task
<
KeepAliveSession
?>
TryCreateKeepAliveSessionAsync
(
string
serviceName
,
object
?
callbackTarget
,
CancellationToken
cancellationToken
)
{
var
connection
=
await
TryCreateConnectionAsync
(
serviceName
,
callbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
connection
==
null
)
...
...
@@ -128,9 +128,9 @@ public static string CreateClientId(string prefix)
}
public
async
Task
<
bool
>
TryRunRemoteAsync
(
string
serviceName
,
string
targetName
,
Solution
solution
,
IReadOnlyList
<
object
>
arguments
,
CancellationToken
cancellationToken
,
object
?
callbackTarget
=
null
)
IReadOnlyList
<
object
>
arguments
,
object
?
callbackTarget
,
CancellationToken
cancellationToken
)
{
using
var
session
=
await
TryCreateSessionAsync
(
serviceName
,
solution
,
ca
ncellationToken
,
callbackTarget
).
ConfigureAwait
(
false
);
using
var
session
=
await
TryCreateSessionAsync
(
serviceName
,
solution
,
ca
llbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
session
==
null
)
{
return
false
;
...
...
@@ -140,7 +140,7 @@ public static string CreateClientId(string prefix)
return
true
;
}
public
async
Task
<
bool
>
TryRunRemoteAsync
(
string
serviceName
,
string
targetName
,
IReadOnlyList
<
object
>
arguments
,
CancellationToken
cancellationToken
,
object
?
callbackTarget
=
null
)
public
async
Task
<
bool
>
TryRunRemoteAsync
(
string
serviceName
,
string
targetName
,
IReadOnlyList
<
object
>
arguments
,
object
?
callbackTarget
,
CancellationToken
cancellationToken
)
{
using
var
connection
=
await
TryCreateConnectionAsync
(
serviceName
,
callbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
connection
==
null
)
...
...
@@ -152,9 +152,9 @@ public async Task<bool> TryRunRemoteAsync(string serviceName, string targetName,
return
true
;
}
public
async
Task
<
Optional
<
T
>>
TryRunRemoteAsync
<
T
>(
string
serviceName
,
string
targetName
,
Solution
solution
,
IReadOnlyList
<
object
>
arguments
,
CancellationToken
cancellationToken
,
object
?
callbackTarget
=
null
)
public
async
Task
<
Optional
<
T
>>
TryRunRemoteAsync
<
T
>(
string
serviceName
,
string
targetName
,
Solution
solution
,
IReadOnlyList
<
object
>
arguments
,
object
?
callbackTarget
,
CancellationToken
cancellationToken
)
{
using
var
session
=
await
TryCreateSessionAsync
(
serviceName
,
solution
,
ca
ncellationToken
,
callbackTarget
).
ConfigureAwait
(
false
);
using
var
session
=
await
TryCreateSessionAsync
(
serviceName
,
solution
,
ca
llbackTarget
,
cancellationToken
).
ConfigureAwait
(
false
);
if
(
session
==
null
)
{
return
default
;
...
...
src/Workspaces/Core/Portable/Remote/RemoteHostClientExtensions.cs
浏览文件 @
4625654d
...
...
@@ -36,6 +36,7 @@ public static async Task SynchronizePrimaryWorkspaceAsync(this Workspace workspa
nameof
(
IRemoteHostService
.
SynchronizePrimaryWorkspaceAsync
),
solution
,
new
object
[]
{
checksum
,
solution
.
WorkspaceVersion
},
callbackTarget
:
null
,
cancellationToken
).
ConfigureAwait
(
false
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录