Skip to content

Commit

Permalink
Rename class to VisualDiagnosticsServiceBroker
Browse files Browse the repository at this point in the history
  • Loading branch information
chabiss committed Mar 18, 2024
1 parent 9ceadab commit c9cdb3a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts
/// <summary>
/// Facade interface for getting broker service successfully through MEF
/// </summary>
internal interface IVisualDiagnosticsBrokeredDebuggerServices
internal interface IVisualDiagnosticsServiceBroker
{
Task<IServiceBroker> GetServiceBrokerAsync();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal
/// <summary>
/// This is a simple wrapper to succeed at getting the broker service using System.ComponentModel.Composition inside an LSP service OnInitialized factory
/// </summary>
[Export(typeof(IVisualDiagnosticsBrokeredDebuggerServices))]
internal sealed class VisualDiagnosticsBrokeredDebuggerServices : IVisualDiagnosticsBrokeredDebuggerServices
[Export(typeof(IVisualDiagnosticsServiceBroker))]
internal sealed class VisualDiagnosticsServiceBroker : IVisualDiagnosticsServiceBroker
{
private readonly Lazy<Task<IBrokeredServiceContainer>> _container;

[ImportingConstructor]
[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
public VisualDiagnosticsBrokeredDebuggerServices(
public VisualDiagnosticsServiceBroker(
[Import(typeof(SVsBrokeredServiceContainer))]
Lazy<Task<IBrokeredServiceContainer>> serviceBroker)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics;
internal sealed class VisualDiagnosticsServiceFactory : ILspServiceFactory
{
private readonly LspWorkspaceRegistrationService _lspWorkspaceRegistrationService;
private readonly Lazy<IVisualDiagnosticsBrokeredDebuggerServices> _brokeredDebuggerServices;
private readonly Lazy<IVisualDiagnosticsServiceBroker> _brokeredDebuggerServices;
private readonly IAsynchronousOperationListenerProvider _listenerProvider;

[Obsolete(MefConstruction.ImportingConstructorMessage, error: true)]
[ImportingConstructor]
public VisualDiagnosticsServiceFactory(
LspWorkspaceRegistrationService lspWorkspaceRegistrationService,
Lazy<IVisualDiagnosticsBrokeredDebuggerServices> brokeredDebuggerServices,
Lazy<IVisualDiagnosticsServiceBroker> brokeredDebuggerServices,
IAsynchronousOperationListenerProvider listenerProvider)
{
_lspWorkspaceRegistrationService = lspWorkspaceRegistrationService;
Expand All @@ -53,7 +53,7 @@ private class OnInitializedService : ILspService, IOnInitialized, IDisposable
private readonly LspServices _lspServices;
private readonly LspWorkspaceManager _lspWorkspaceManager;
private readonly LspWorkspaceRegistrationService _lspWorkspaceRegistrationService;
private readonly Lazy<IVisualDiagnosticsBrokeredDebuggerServices> _brokeredDebuggerServices;
private readonly Lazy<IVisualDiagnosticsServiceBroker> _brokeredDebuggerServices;
private readonly System.Timers.Timer _timer;
private readonly SemaphoreSlim _mutex = new SemaphoreSlim(1);
private readonly IAsynchronousOperationListener _asyncListener;
Expand All @@ -63,7 +63,7 @@ private class OnInitializedService : ILspService, IOnInitialized, IDisposable
public OnInitializedService(LspServices lspServices,
LspWorkspaceManager lspWorkspaceManager,
LspWorkspaceRegistrationService lspWorkspaceRegistrationService,
Lazy<IVisualDiagnosticsBrokeredDebuggerServices> brokeredDebuggerServices,
Lazy<IVisualDiagnosticsServiceBroker> brokeredDebuggerServices,
IAsynchronousOperationListenerProvider listenerProvider)
{
_lspServices = lspServices;
Expand All @@ -73,7 +73,7 @@ public OnInitializedService(LspServices lspServices,
_timer = new System.Timers.Timer();
_timer.Interval = 500;
_timer.Elapsed += Timer_Elapsed;
_asyncListener = listenerProvider.GetListener(nameof(VisualDiagnosticsBrokeredDebuggerServices));
_asyncListener = listenerProvider.GetListener(nameof(VisualDiagnosticsServiceBroker));
}

private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
Expand Down Expand Up @@ -115,7 +115,7 @@ private async Task OnInitializeVisualDiagnosticsLanguageServiceAsync()
return;
}

IVisualDiagnosticsBrokeredDebuggerServices brokerService = _brokeredDebuggerServices.Value;
IVisualDiagnosticsServiceBroker brokerService = _brokeredDebuggerServices.Value;

if (brokerService != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ConnectionInfo
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ConnectionInfo.ConnectionInfo() -> void
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices.GetHotReloadSessionNotificationServiceAsync() -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Debugger.Contracts.HotReload.IHotReloadSessionNotificationService?>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices.GetManagedHotReloadAgentManagerServiceAsync() -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Debugger.Contracts.HotReload.IManagedHotReloadAgentManagerService?>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices.GetManagedHotReloadServiceAsync() -> System.Threading.Tasks.Task<Microsoft.VisualStudio.Debugger.Contracts.HotReload.IManagedHotReloadService?>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices.GetServiceBrokerAsync() -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.IServiceBroker!>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsLanguageService
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsLanguageService.HandleDiagnosticSessionStartAsync(Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ProcessInfo info, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsLanguageService.HandleDiagnosticSessionStopAsync(Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ProcessInfo info, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsLanguageService.InitializeAsync(Microsoft.ServiceHub.Framework.IServiceBroker! serviceBroker, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsLanguageService.RequestDataBridgeConnectionAsync(string! connectionId, System.Threading.CancellationToken token) -> System.Threading.Tasks.Task<Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ConnectionInfo>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ProcessInfo
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ProcessInfo.ProcessInfo(System.Guid ProcessId, uint? LocalProcessId, string? Path) -> void
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsBrokeredDebuggerServices
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsBrokeredDebuggerServices.GetServiceBrokerAsync() -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.IServiceBroker!>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsBrokeredDebuggerServices.VisualDiagnosticsBrokeredDebuggerServices(System.Lazy<System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.ServiceBroker.IBrokeredServiceContainer!>!>! serviceBroker) -> void
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsServiceBroker
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsServiceBroker.GetServiceBrokerAsync() -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.IServiceBroker!>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsServiceBroker
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsServiceBroker.GetServiceBrokerAsync() -> System.Threading.Tasks.Task<Microsoft.ServiceHub.Framework.IServiceBroker!>!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Internal.VisualDiagnosticsServiceBroker.VisualDiagnosticsServiceBroker(System.Lazy<System.Threading.Tasks.Task<Microsoft.VisualStudio.Shell.ServiceBroker.IBrokeredServiceContainer!>!>! serviceBroker) -> void
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.RunningProcessEntry
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.RunningProcessEntry.RunningProcessEntry() -> void
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.VisualDiagnosticsServiceFactory
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.VisualDiagnosticsServiceFactory.CreateILspService(Microsoft.CodeAnalysis.LanguageServer.LspServices! lspServices, Microsoft.CodeAnalysis.LanguageServer.WellKnownLspServerKinds serverKind) -> Microsoft.CodeAnalysis.LanguageServer.ILspService!
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.VisualDiagnosticsServiceFactory.VisualDiagnosticsServiceFactory(Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceRegistrationService! lspWorkspaceRegistrationService, System.Lazy<Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices!>! brokeredDebuggerServices, Microsoft.CodeAnalysis.Shared.TestHooks.IAsynchronousOperationListenerProvider! listenerProvider) -> void
~override Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.ConnectionInfo.ToString() -> string
Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.VisualDiagnosticsServiceFactory.VisualDiagnosticsServiceFactory(Microsoft.CodeAnalysis.LanguageServer.LspWorkspaceRegistrationService! lspWorkspaceRegistrationService, System.Lazy<Microsoft.CodeAnalysis.ExternalAccess.VisualDiagnostics.Contracts.IVisualDiagnosticsBrokeredDebuggerServices!>! brokeredDebuggerServices, Microsoft.CodeAnalysis.Shared.TestHooks.IAsynchronousOperationListenerProvider! listenerProvider) -> void

0 comments on commit c9cdb3a

Please sign in to comment.