本文整理汇总了C#中IImmutableSet.?.Select方法的典型用法代码示例。如果您正苦于以下问题:C# IImmutableSet.?.Select方法的具体用法?C# IImmutableSet.?.Select怎么用?C# IImmutableSet.?.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IImmutableSet
的用法示例。
在下文中一共展示了IImmutableSet.?.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindReferencesInServiceProcessAsync
private static async Task FindReferencesInServiceProcessAsync(
SymbolAndProjectId symbolAndProjectId,
Solution solution,
IStreamingFindReferencesProgress progress,
IImmutableSet<Document> documents,
CancellationToken cancellationToken)
{
var client = await solution.Workspace.GetRemoteHostClientAsync(cancellationToken).ConfigureAwait(false);
if (client == null)
{
await FindReferencesInCurrentProcessAsync(
symbolAndProjectId, solution, progress, documents, cancellationToken).ConfigureAwait(false);
return;
}
// Create a callback that we can pass to the server process to hear about the
// results as it finds them. When we hear about results we'll forward them to
// the 'progress' parameter which will then upate the UI.
var serverCallback = new ServerCallback(solution, progress, cancellationToken);
using (var session = await client.CreateCodeAnalysisServiceSessionAsync(
solution, serverCallback, cancellationToken).ConfigureAwait(false))
{
await session.InvokeAsync(
nameof(IRemoteSymbolFinder.FindReferencesAsync),
SerializableSymbolAndProjectId.Dehydrate(symbolAndProjectId),
documents?.Select(SerializableDocumentId.Dehydrate).ToArray()).ConfigureAwait(false);
}
}