1 write to InteractionService
aspire (1)
Commands\BaseCommand.cs (1)
26
InteractionService
= interactionService;
127 references to InteractionService
aspire (127)
Commands\AddCommand.cs (13)
67
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, cancellationToken))
90
var packagesWithChannels = await
InteractionService
.ShowStatusAsync(
126
InteractionService
.DisplayError(AddCommandStrings.NoPackagesFound);
154
var addPackageResult = await
InteractionService
.ShowStatusAsync(
177
InteractionService
.DisplayLines(outputCollector.GetLines());
178
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageInstallationFailed, addPackageResult));
183
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version));
189
return HandleProjectLocatorException(ex,
InteractionService
);
193
InteractionService
.DisplayCancellationMessage();
198
InteractionService
.DisplayError(ex.Message);
203
InteractionService
.DisplayLines(outputCollector.GetLines());
204
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.ErrorOccurredWhileAddingPackage, ex.Message));
242
InteractionService
.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm));
Commands\BaseCommand.cs (1)
48
InteractionService
.DisplayEmptyLine();
Commands\CacheCommand.cs (5)
21
var clearCommand = new ClearCommand(
InteractionService
, features, updateNotifier, executionContext);
51
InteractionService
.DisplayMessage("information", CacheCommandStrings.CacheAlreadyEmpty);
86
InteractionService
.DisplayMessage("information", CacheCommandStrings.CacheAlreadyEmpty);
90
InteractionService
.DisplaySuccess(CacheCommandStrings.CacheCleared);
97
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, CacheCommandStrings.CacheClearFailed, ex.Message));
Commands\ConfigCommand.cs (26)
34
var getCommand = new GetCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext);
35
var setCommand = new SetCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext);
36
var listCommand = new ListCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext);
37
var deleteCommand = new DeleteCommand(configurationService,
InteractionService
, features, updateNotifier, executionContext);
88
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
97
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.GetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
107
InteractionService
.DisplayPlainText(value);
112
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
152
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
158
InteractionService
.DisplayError(ErrorStrings.ConfigurationValueRequired);
167
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
168
var value = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForValue, required: true, cancellationToken: cancellationToken);
169
var isGlobal = await
InteractionService
.PromptForSelectionAsync(
183
InteractionService
.DisplaySuccess(isGlobal
193
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorSettingConfiguration, ex.Message));
211
if (
InteractionService
is ExtensionInteractionService extensionInteractionService)
225
InteractionService
.DisplayMessage("information", ConfigCommandStrings.NoConfigurationValuesFound);
229
InteractionService
.DisplayLines(allConfig.Select(kvp => ("stdout", $"{kvp.Key}={kvp.Value}")));
262
InteractionService
.DisplayError(ErrorStrings.ConfigurationKeyRequired);
271
var key = await
InteractionService
.PromptForStringAsync(ConfigCommandStrings.DeleteCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
276
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
280
var isGlobal = await
InteractionService
.PromptForSelectionAsync(
299
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedGlobally, key));
303
InteractionService
.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedLocally, key));
310
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
316
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ErrorDeletingConfiguration, ex.Message));
Commands\ExecCommand.cs (23)
84
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, cancellationToken))
100
InteractionService
.DisplayError(ExecCommandStrings.TargetResourceNotSpecified);
108
InteractionService
.DisplayError(ExecCommandStrings.NoCommandSpecified);
116
InteractionService
.DisplayError(ExecCommandStrings.FailedToParseCommand);
142
InteractionService
.DisplayError(ErrorStrings.CommandNotSupportedWithSingleFileAppHost);
154
appHostCompatibilityCheck = await AppHostHelper.CheckAppHostCompatibilityAsync(_runner,
InteractionService
, effectiveAppHostProjectFile, _telemetry, ExecutionContext.WorkingDirectory, cancellationToken);
192
backchannel = await
InteractionService
.ShowStatusAsync(
200
InteractionService
.DisplayMessage(emoji: "bug", InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
210
commandExitCode = await
InteractionService
.ShowStatusAsync<int?>(
219
InteractionService
.WriteConsoleLog(output.Text, output.LineNumber, output.Type, output.IsErrorMessage);
233
_ = await
InteractionService
.ShowStatusAsync<int>(
254
InteractionService
.DisplayLines(runOutputCollector.GetLines());
255
InteractionService
.DisplayError(RunCommandStrings.ProjectCouldNotBeRun);
265
InteractionService
.DisplayLines(runOutputCollector.GetLines());
266
InteractionService
.DisplayError(RunCommandStrings.ProjectCouldNotBeRun);
272
InteractionService
.DisplayCancellationMessage();
277
return HandleProjectLocatorException(ex,
InteractionService
);
281
return
InteractionService
.DisplayIncompatibleVersionError(
288
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message));
293
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message));
294
InteractionService
.DisplayLines(runOutputCollector.GetLines());
299
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
300
InteractionService
.DisplayLines(runOutputCollector.GetLines());
Commands\NewCommand.cs (3)
100
var templateCommand = new TemplateCommand(template, ExecuteAsync, _features, _updateNotifier, _executionContext,
InteractionService
);
124
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, cancellationToken))
133
if (templateResult.OutputPath is not null && ExtensionHelper.IsExtensionHost(
InteractionService
, out var extensionInteractionService, out _))
Commands\PublishCommandBase.cs (29)
83
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, cancellationToken))
110
InteractionService
.DisplayError(ErrorStrings.SingleFileAppHostFeatureNotEnabled);
129
appHostCompatibilityCheck = await AppHostHelper.CheckAppHostCompatibilityAsync(_runner,
InteractionService
, effectiveAppHostFile, _telemetry, ExecutionContext.WorkingDirectory, cancellationToken);
145
var buildExitCode = await AppHostHelper.BuildAppHostAsync(_runner,
InteractionService
, effectiveAppHostFile, buildOptions, ExecutionContext.WorkingDirectory, cancellationToken);
149
InteractionService
.DisplayLines(buildOutputCollector.GetLines());
150
InteractionService
.DisplayError(InteractionServiceStrings.ProjectCouldNotBeBuilt);
184
InteractionService
.DisplayMessage("bug", InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
187
var backchannel = await
InteractionService
.ShowStatusAsync($":hammer_and_wrench: {GetProgressMessage()}", async () =>
212
InteractionService
.DisplayLines(operationOutputCollector.GetLines());
219
InteractionService
.DisplayError(GetCanceledMessage());
224
return HandleProjectLocatorException(ex,
InteractionService
);
228
return
InteractionService
.DisplayIncompatibleVersionError(
235
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message));
236
InteractionService
.DisplayLines(operationOutputCollector.GetLines());
241
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message));
264
InteractionService
.DisplaySubtleMessage($"[DEBUG] Step {stepCounter++}: {activity.Data.StatusText}");
272
InteractionService
.DisplaySubtleMessage($"[DEBUG] Step {activity.Data.Id}: {status} - {activity.Data.StatusText}");
288
InteractionService
.DisplaySubtleMessage($"[DEBUG] Task {activity.Data.Id} ({stepId}): {status} - {activity.Data.StatusText}");
291
InteractionService
.DisplaySubtleMessage($"[DEBUG] {activity.Data.CompletionMessage}");
296
InteractionService
.DisplaySubtleMessage($"[DEBUG] Task {activity.Data.Id} ({stepId}): {activity.Data.StatusText}");
307
InteractionService
.DisplaySubtleMessage($"[DEBUG] {OperationCompletedPrefix}: {status} - {publishingActivity.Data.StatusText}");
555
InteractionService
.DisplayError(error);
561
InputType.Text => await
InteractionService
.PromptForStringAsync(
567
InputType.SecretText => await
InteractionService
.PromptForStringAsync(
576
InputType.Boolean => (await
InteractionService
.ConfirmAsync(promptText, defaultValue: ParseBooleanValue(input.Value), cancellationToken: cancellationToken)).ToString().ToLowerInvariant(),
580
_ => await
InteractionService
.PromptForStringAsync(promptText, defaultValue: input.Value, required: input.Required, cancellationToken: cancellationToken)
588
return await
InteractionService
.PromptForStringAsync(promptText, defaultValue: input.Value, required: input.Required, cancellationToken: cancellationToken);
593
var selectedChoice = await
InteractionService
.PromptForSelectionAsync(
616
return await
InteractionService
.PromptForStringAsync(
Commands\RunCommand.cs (23)
75
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _))
88
var isExtensionHost = ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out _);
93
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out var extensionInteractionService, out _)
102
if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller,
InteractionService
, cancellationToken))
127
InteractionService
.DisplayError(ErrorStrings.SingleFileAppHostFeatureNotEnabled);
157
if (!ExtensionHelper.IsExtensionHost(
InteractionService
, out _, out var extensionBackchannel)
160
var buildExitCode = await AppHostHelper.BuildAppHostAsync(_runner,
InteractionService
, effectiveAppHostFile, buildOptions, ExecutionContext.WorkingDirectory, cancellationToken);
164
InteractionService
.DisplayLines(buildOutputCollector.GetLines());
165
InteractionService
.DisplayError(InteractionServiceStrings.ProjectCouldNotBeBuilt);
179
appHostCompatibilityCheck = await AppHostHelper.CheckAppHostCompatibilityAsync(_runner,
InteractionService
, effectiveAppHostFile, _telemetry, ExecutionContext.WorkingDirectory, cancellationToken);
227
var backchannel = await
InteractionService
.ShowStatusAsync(RunCommandStrings.ConnectingToAppHost, async () => { return await backchannelCompletitionSource.Task.WaitAsync(cancellationToken); });
233
var dashboardUrls = await
InteractionService
.ShowStatusAsync(RunCommandStrings.StartingDashboard, async () => { return await backchannel.GetDashboardUrlsAsync(cancellationToken); });
237
InteractionService
.DisplayError(RunCommandStrings.DashboardFailedToStart);
238
InteractionService
.DisplayLines(runOutputCollector.GetLines());
329
if (ExtensionHelper.IsExtensionHost(
InteractionService
, out extensionInteractionService, out _))
341
InteractionService
.DisplayCancellationMessage();
346
return HandleProjectLocatorException(ex,
InteractionService
);
350
return
InteractionService
.DisplayIncompatibleVersionError(
357
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.CertificateTrustError, ex.Message.EscapeMarkup()));
362
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.ErrorConnectingToAppHost, ex.Message.EscapeMarkup()));
363
InteractionService
.DisplayLines(runOutputCollector.GetLines());
368
InteractionService
.DisplayError(string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.UnexpectedErrorOccurred, ex.Message.EscapeMarkup()));
369
InteractionService
.DisplayLines(runOutputCollector.GetLines());
Commands\UpdateCommand.cs (4)
44
InteractionService
.DisplayError(ErrorStrings.CommandNotSupportedWithSingleFileAppHost);
50
var channel = await
InteractionService
.PromptForSelectionAsync(UpdateCommandStrings.SelectChannelPrompt, channels, (c) => c.Name, cancellationToken);
57
InteractionService
.DisplayError(message);
62
return HandleProjectLocatorException(ex,
InteractionService
);