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