4 instantiations of AppHostAuxiliaryBackchannel
aspire (2)
Backchannel\AppHostAuxiliaryBackchannel.cs (1)
114var backchannel = new AppHostAuxiliaryBackchannel(socketPath, logger);
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
272var connection = new AppHostAuxiliaryBackchannel(hash, socketPath, rpc, mcpInfo, appHostInfo, isInScope, logger);
Aspire.Cli.Tests (2)
Mcp\AppHostConnectionSelectionLogicTests.cs (1)
70return new AppHostAuxiliaryBackchannel(
Mcp\ListAppHostsToolTests.cs (1)
157return new AppHostAuxiliaryBackchannel(hash, socketPath, rpc, mcpInfo: null, appHostInfo, isInScope);
49 references to AppHostAuxiliaryBackchannel
aspire (26)
Backchannel\AppHostAuxiliaryBackchannel.cs (4)
24/// Initializes a new instance of the <see cref="AppHostAuxiliaryBackchannel"/> class 54/// Initializes a new instance of the <see cref="AppHostAuxiliaryBackchannel"/> class 109public static async Task<AppHostAuxiliaryBackchannel> ConnectAsync( 114var backchannel = new AppHostAuxiliaryBackchannel(socketPath, logger);
Backchannel\AuxiliaryBackchannelMonitor.cs (10)
24private readonly ConcurrentDictionary<string, AppHostAuxiliaryBackchannel> _connections = new(); 33public IReadOnlyDictionary<string, AppHostAuxiliaryBackchannel> Connections => _connections; 43public AppHostAuxiliaryBackchannel? SelectedConnection 57var selectedConnection = connections.FirstOrDefault(c => 86public IReadOnlyList<AppHostAuxiliaryBackchannel> GetConnectionsForWorkingDirectory(DirectoryInfo workingDirectory) 174foreach (var connection in _connections.Values) 210if (!string.IsNullOrEmpty(hash) && _connections.TryRemove(hash, out var connection)) 272var connection = new AppHostAuxiliaryBackchannel(hash, socketPath, rpc, mcpInfo, appHostInfo, isInScope, logger); 278if (_connections.TryRemove(hash, out var conn)) 335private static async Task DisconnectAsync(AppHostAuxiliaryBackchannel connection)
Backchannel\IAuxiliaryBackchannelMonitor.cs (3)
14IReadOnlyDictionary<string, AppHostAuxiliaryBackchannel> Connections { get; } 25AppHostAuxiliaryBackchannel? SelectedConnection { get; } 32IReadOnlyList<AppHostAuxiliaryBackchannel> GetConnectionsForWorkingDirectory(DirectoryInfo workingDirectory);
Commands\McpStartCommand.cs (6)
180var connection = GetSelectedConnection(); 223var connection = GetSelectedConnection(); 304var connection = GetSelectedConnection(); 369private AppHostAuxiliaryBackchannel? GetSelectedConnection() 382var selectedConnection = connections.FirstOrDefault(c => 421var fallback = connections
Mcp\SelectAppHostTool.cs (1)
72var matchingConnection = auxiliaryBackchannelMonitor.Connections.Values
Projects\RunningInstanceManager.cs (2)
46using var backchannel = await AppHostAuxiliaryBackchannel.ConnectAsync(socketPath, _logger, cancellationToken).ConfigureAwait(false);
Aspire.Cli.Tests (23)
Mcp\AppHostConnectionSelectionLogicTests.cs (7)
25var inScope = CreateConnection("hash1", appHostPath: "C:/repo/AppHost1", isInScope: true, processId: 1); 26var outOfScope = CreateConnection("hash2", appHostPath: "C:/other/AppHost2", isInScope: false, processId: 2); 41var inScope = CreateConnection("hash1", appHostPath: "C:/repo/AppHost1", isInScope: true, processId: 1); 46var selected = monitor.SelectedConnection; 57var inScope = CreateConnection("hash1", appHostPath: "C:/repo/AppHost1", isInScope: true, processId: 1); 58var outOfScope = CreateConnection("hash2", appHostPath: "C:/other/AppHost2", isInScope: false, processId: 2); 66private static AppHostAuxiliaryBackchannel CreateConnection(string hash, string appHostPath, bool isInScope, int processId)
Mcp\ListAppHostsToolTests.cs (5)
53var connection = CreateAppHostConnection("hash1", "/tmp/socket1", appHostInfo, isInScope: true); 85var connection = CreateAppHostConnection("hash2", "/tmp/socket2", appHostInfo, isInScope: false); 117var inScopeConnection = CreateAppHostConnection("hash1", "/tmp/socket1", inScopeAppHostInfo, isInScope: true); 128var outOfScopeConnection = CreateAppHostConnection("hash2", "/tmp/socket2", outOfScopeAppHostInfo, isInScope: false); 153private static AppHostAuxiliaryBackchannel CreateAppHostConnection(string hash, string socketPath, AppHostInformation appHostInfo, bool isInScope)
Mcp\MockPackagingService.cs (5)
64private readonly Dictionary<string, AppHostAuxiliaryBackchannel> _connections = new(); 66public IReadOnlyDictionary<string, AppHostAuxiliaryBackchannel> Connections => _connections; 70public AppHostAuxiliaryBackchannel? SelectedConnection => null; 72public IReadOnlyList<AppHostAuxiliaryBackchannel> GetConnectionsForWorkingDirectory(DirectoryInfo workingDirectory) 75return Array.Empty<AppHostAuxiliaryBackchannel>();
TestServices\TestAuxiliaryBackchannelMonitor.cs (6)
10private readonly Dictionary<string, AppHostAuxiliaryBackchannel> _connections = new(); 12public IReadOnlyDictionary<string, AppHostAuxiliaryBackchannel> Connections => _connections; 16public AppHostAuxiliaryBackchannel? SelectedConnection 30var selectedConnection = connections.FirstOrDefault(c => 56public IReadOnlyList<AppHostAuxiliaryBackchannel> GetConnectionsForWorkingDirectory(DirectoryInfo workingDirectory) 79public void AddConnection(string hash, AppHostAuxiliaryBackchannel connection)