/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/EditorFeatures/Core/EditAndContinue/ManagedHotReloadServiceProxy.cs
43 строки
2 KB
Tomáš Matoušek
Fixes Hot reload logging in DevKit (#84179)
20 июн 2026, 02:32
Не верифицирован
20 июн 2026, 02:32
db649bc
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Immutable; using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.BrokeredServices; using Microsoft.ServiceHub.Framework; using Microsoft.VisualStudio.Debugger.Contracts.HotReload; using InternalContracts = Microsoft.CodeAnalysis.Contracts.EditAndContinue; namespace Microsoft.CodeAnalysis.EditAndContinue; internal sealed class ManagedHotReloadServiceProxy(IServiceBroker serviceBroker) : BrokeredServiceProxy<IManagedHotReloadService>(serviceBroker, #if DEVKIT BrokeredServiceDescriptors.DebuggerManagedHotReloadServiceLegacy #else BrokeredServiceDescriptors.DebuggerManagedHotReloadService #endif ), InternalContracts.IManagedHotReloadService { public async ValueTask<ImmutableArray<InternalContracts.ManagedActiveStatementDebugInfo>> GetActiveStatementsAsync(CancellationToken cancellationToken) { var result = await InvokeAsync((service, cancellationToken) => service.GetActiveStatementsAsync(cancellationToken), cancellationToken).ConfigureAwait(false); return result.SelectAsArray(info => info.ToContract()); } public async ValueTask<InternalContracts.ManagedHotReloadAvailability> GetAvailabilityAsync(Guid module, CancellationToken cancellationToken) { var result = await InvokeAsync((service, module, cancellationToken) => service.GetAvailabilityAsync(module, cancellationToken), module, cancellationToken).ConfigureAwait(false); return result.ToContract(); } public ValueTask<ImmutableArray<string>> GetCapabilitiesAsync(CancellationToken cancellationToken) => InvokeAsync((service, cancellationToken) => service.GetCapabilitiesAsync(cancellationToken), cancellationToken); public ValueTask PrepareModuleForUpdateAsync(Guid module, CancellationToken cancellationToken) => InvokeAsync((service, module, cancellationToken) => service.PrepareModuleForUpdateAsync(module, cancellationToken), module, cancellationToken); }