@@ -17,7 +17,7 @@ internal interface IDotNetCliRunner
17
17
{
18
18
Task < ( int ExitCode , bool IsAspireHost , string ? AspireHostingSdkVersion ) > GetAppHostInformationAsync ( FileInfo projectFile , CancellationToken cancellationToken ) ;
19
19
Task < ( int ExitCode , JsonDocument ? Output ) > GetProjectItemsAndPropertiesAsync ( FileInfo projectFile , string [ ] items , string [ ] properties , CancellationToken cancellationToken ) ;
20
- Task < int > RunAsync ( FileInfo projectFile , bool watch , bool noBuild , string [ ] args , IDictionary < string , string > ? env , TaskCompletionSource < AppHostBackchannel > ? backchannelCompletionSource , CancellationToken cancellationToken ) ;
20
+ Task < int > RunAsync ( FileInfo projectFile , bool watch , bool noBuild , string [ ] args , IDictionary < string , string > ? env , TaskCompletionSource < IAppHostBackchannel > ? backchannelCompletionSource , CancellationToken cancellationToken ) ;
21
21
Task < int > CheckHttpCertificateAsync ( CancellationToken cancellationToken ) ;
22
22
Task < int > TrustHttpCertificateAsync ( CancellationToken cancellationToken ) ;
23
23
Task < ( int ExitCode , string ? TemplateVersion ) > InstallTemplateAsync ( string packageName , string version , string ? nugetSource , bool force , CancellationToken cancellationToken ) ;
@@ -134,7 +134,7 @@ internal sealed class DotNetCliRunner(ILogger<DotNetCliRunner> logger, IServiceP
134
134
}
135
135
}
136
136
137
- public async Task < int > RunAsync ( FileInfo projectFile , bool watch , bool noBuild , string [ ] args , IDictionary < string , string > ? env , TaskCompletionSource < AppHostBackchannel > ? backchannelCompletionSource , CancellationToken cancellationToken )
137
+ public async Task < int > RunAsync ( FileInfo projectFile , bool watch , bool noBuild , string [ ] args , IDictionary < string , string > ? env , TaskCompletionSource < IAppHostBackchannel > ? backchannelCompletionSource , CancellationToken cancellationToken )
138
138
{
139
139
using var activity = _activitySource . StartActivity ( ) ;
140
140
@@ -316,7 +316,7 @@ internal static string GetBackchannelSocketPath()
316
316
return socketPath ;
317
317
}
318
318
319
- public async Task < int > ExecuteAsync ( string [ ] args , IDictionary < string , string > ? env , DirectoryInfo workingDirectory , TaskCompletionSource < AppHostBackchannel > ? backchannelCompletionSource , Action < StreamWriter , StreamReader , StreamReader > ? streamsCallback , CancellationToken cancellationToken )
319
+ public async Task < int > ExecuteAsync ( string [ ] args , IDictionary < string , string > ? env , DirectoryInfo workingDirectory , TaskCompletionSource < IAppHostBackchannel > ? backchannelCompletionSource , Action < StreamWriter , StreamReader , StreamReader > ? streamsCallback , CancellationToken cancellationToken )
320
320
{
321
321
using var activity = _activitySource . StartActivity ( ) ;
322
322
@@ -436,13 +436,13 @@ async Task ForwardStreamToLoggerAsync(StreamReader reader, string identifier, Pr
436
436
}
437
437
}
438
438
439
- private async Task StartBackchannelAsync ( Process process , string socketPath , TaskCompletionSource < AppHostBackchannel > backchannelCompletionSource , CancellationToken cancellationToken )
439
+ private async Task StartBackchannelAsync ( Process process , string socketPath , TaskCompletionSource < IAppHostBackchannel > backchannelCompletionSource , CancellationToken cancellationToken )
440
440
{
441
441
using var activity = _activitySource . StartActivity ( ) ;
442
442
443
443
using var timer = new PeriodicTimer ( TimeSpan . FromMilliseconds ( 50 ) ) ;
444
444
445
- var backchannel = serviceProvider . GetRequiredService < AppHostBackchannel > ( ) ;
445
+ var backchannel = serviceProvider . GetRequiredService < IAppHostBackchannel > ( ) ;
446
446
var connectionAttempts = 0 ;
447
447
448
448
logger . LogDebug ( "Starting backchannel connection to AppHost at {SocketPath}" , socketPath ) ;
@@ -454,7 +454,7 @@ private async Task StartBackchannelAsync(Process process, string socketPath, Tas
454
454
try
455
455
{
456
456
logger . LogTrace ( "Attempting to connect to AppHost backchannel at {SocketPath} (attempt {Attempt})" , socketPath , connectionAttempts ++ ) ;
457
- await backchannel . ConnectAsync ( process , socketPath , cancellationToken ) . ConfigureAwait ( false ) ;
457
+ await backchannel . ConnectAsync ( socketPath , cancellationToken ) . ConfigureAwait ( false ) ;
458
458
backchannelCompletionSource . SetResult ( backchannel ) ;
459
459
logger . LogDebug ( "Connected to AppHost backchannel at {SocketPath}" , socketPath ) ;
460
460
return ;
0 commit comments