36 references to StringUtils
aspire (32)
Backchannel\ExtensionBackchannel.cs (3)
548
var choicesByFormattedValue = choicesList.ToDictionary(choice =>
StringUtils
.RemoveMarkup(choiceFormatter(choice)), choice => choice);
578
var choicesByFormattedValue = choicesList.ToDictionary(choice =>
StringUtils
.RemoveMarkup(choiceFormatter(choice)), choice => choice);
580
.Select(choice =>
StringUtils
.RemoveMarkup(choiceFormatter(choice)))
Commands\IntegrationPackageSearchService.cs (2)
199
StringUtils
.CalculateFuzzyScore(searchTerm, package.FriendlyName),
200
StringUtils
.CalculateFuzzyScore(searchTerm, package.Package.Id));
Interaction\ConsoleInteractionService.cs (2)
513
var logMessage = allowMarkup ?
StringUtils
.RemoveMarkup(message) : message;
842
var availableChoices = string.Join(", ", choices.Select(c =>
StringUtils
.RemoveMarkup(choiceFormatter(c))));
Interaction\ExtensionInteractionService.cs (22)
89
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(
StringUtils
.RemoveMarkup(statusText), _cancellationToken));
106
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(
StringUtils
.RemoveMarkup(initialStatusText), _cancellationToken));
115
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(
StringUtils
.RemoveMarkup(statusText), _cancellationToken));
130
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.ShowStatusAsync(
StringUtils
.RemoveMarkup(statusText), _cancellationToken));
173
result = await Backchannel.PromptForSecretStringAsync(
StringUtils
.RemoveMarkup(promptText), validator, required, _cancellationToken).ConfigureAwait(false);
178
result = await Backchannel.PromptForStringAsync(
StringUtils
.RemoveMarkup(promptText), binding?.DefaultValue, validator, required, _cancellationToken).ConfigureAwait(false);
183
result = await Backchannel.PromptForStringAsync(
StringUtils
.RemoveMarkup(promptText), binding?.DefaultValue, validator, required, _cancellationToken).ConfigureAwait(false);
225
var result = await Backchannel.PromptForFilePathAsync(
StringUtils
.RemoveMarkup(promptText), binding?.DefaultValue, directory, _cancellationToken).ConfigureAwait(false);
287
var result = await Backchannel.ConfirmAsync(
StringUtils
.RemoveMarkup(promptText), binding?.DefaultValue ?? false, _cancellationToken).ConfigureAwait(false);
325
var result = await Backchannel.PromptForSelectionAsync(
StringUtils
.RemoveMarkup(promptText), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false);
364
var result = await Backchannel.PromptForSelectionsAsync(
StringUtils
.RemoveMarkup(promptText), choices, choiceFormatter, preSelected, _cancellationToken).ConfigureAwait(false);
402
await Backchannel.DisplayErrorAsync(
StringUtils
.RemoveMarkup(errorMessage), _cancellationToken);
413
await Backchannel.DisplayErrorAsync(
StringUtils
.RemoveMarkup(errorMessage), materializedActions, _cancellationToken);
423
await Backchannel.DisplayMessageAsync(emoji.Name,
StringUtils
.RemoveMarkup(message), _cancellationToken);
434
await Backchannel.DisplayMessageAsync(emoji.Name,
StringUtils
.RemoveMarkup(message), materializedActions, _cancellationToken);
526
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplaySuccessAsync(
StringUtils
.RemoveMarkup(message), _cancellationToken));
533
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.DisplaySubtleMessageAsync(
StringUtils
.RemoveMarkup(message), _cancellationToken));
556
StringUtils
.RemoveMarkup(line.Line))), _cancellationToken));
623
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.LogMessageAsync(LogLevel.Information,
StringUtils
.RemoveMarkup(markup), _cancellationToken));
645
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.LogMessageAsync(logLevel,
StringUtils
.RemoveMarkup(message), _cancellationToken));
677
var result = _extensionTaskChannel.Writer.TryWrite(() => Backchannel.WriteDebugSessionMessageAsync(
StringUtils
.RemoveMarkup(message), stdout, textStyle, _cancellationToken));
702
await Backchannel.DisplayErrorAsync(
StringUtils
.RemoveMarkup(ex.Message), _cancellationToken);
Utils\ConsoleActivityLogger.cs (2)
466
var nameWidth = Math.Max(timelineLabel.Length, orderedRecords.Max(r =>
StringUtils
.RemoveMarkup(GetIndentedDisplayName(r)).Length));
493
var plainDisplayName =
StringUtils
.RemoveMarkup(displayName);
Utils\Markdown\MarkdownToSpectreConverter.Markup.cs (1)
189
.Select(static row => row.Select(static cell =>
StringUtils
.RemoveMarkup(cell)).ToList())
Aspire.Cli.Tests (4)
TestServices\TestExtensionBackchannel.cs (2)
209
var choicesByFormattedValue = choicesList.ToDictionary(choice =>
StringUtils
.RemoveMarkup(choiceFormatter(choice)), choice => choice);
211
.Select(choice =>
StringUtils
.RemoveMarkup(choiceFormatter(choice)))
Utils\StringUtilsTests.cs (2)
22
var distance =
StringUtils
.GetLevenshteinDistance(source, target);
40
var score =
StringUtils
.CalculateFuzzyScore(searchTerm, target);