94 references to StringComparers
aspire (80)
Agents\AgentConfiguration.cs (4)
15
private readonly Dictionary<string, byte[]?> _files = new(
StringComparers
.FileSystemPath);
16
private readonly Dictionary<string, (bool Exists, string[] Files)> _directories = new(
StringComparers
.FileSystemPath);
24
foreach (var targets in clients.Distinct().GroupBy(client => Path.GetFullPath(client.GetIntegrationConfigPath(scope, workspaceRoot)),
StringComparers
.FileSystemPath))
188
if (previous.Exists != current.Exists || !previous.Files.SequenceEqual(current.Files,
StringComparers
.FileSystemPath))
Agents\AspireSkills\AspireSkillsRemoteConfiguration.cs (1)
175
foreach (var path in paths.Distinct(
StringComparers
.FileSystemPath))
Agents\AspireSkills\LocalAspireSkills.cs (3)
36
var files = new Dictionary<string, string>(
StringComparers
.FileSystemPath);
38
var inspected = new HashSet<string>(
StringComparers
.FileSystemPath);
99
return (files.Values.Order(
StringComparers
.FileSystemPath).ToArray(), errors.Order(StringComparer.Ordinal).ToArray(), hasFileErrors);
Agents\OpenCode\OpenCodeAgentClient.cs (3)
150
var candidateConfig =
StringComparers
.FileSystemPath.Equals(candidate, configFilePath)
278
.Concat(GlobalCatalogSettings()).Distinct(
StringComparers
.FileSystemPath);
290
.Concat(OpenCodePaths.GetConfigPaths(OpenCodePaths.GetManagedSettingsDirectory(context, environment))).Distinct(
StringComparers
.FileSystemPath);
Backchannel\AuxiliaryBackchannelMonitor.cs (5)
42
private readonly ConcurrentDictionary<string, AppHostAuxiliaryBackchannel> _connectionsBySocketPath = new(
StringComparers
.FileSystemPath);
46
private readonly HashSet<string> _knownSocketPaths = new(
StringComparers
.FileSystemPath);
50
private readonly ConcurrentDictionary<string, UnreachableSocket> _unreachableSockets = new(
StringComparers
.FileSystemPath);
405
var currentSocketPaths = currentSockets.Select(socket => socket.SocketPath).ToHashSet(
StringComparers
.FileSystemPath);
420
var removedFiles = _knownSocketPaths.Except(currentSocketPaths,
StringComparers
.FileSystemPath).ToList();
Backchannel\ResourceSnapshotMapper.cs (3)
189
var seenDependencies = new HashSet<string>(
StringComparers
.ResourceName);
401
? new HashSet<string>(
StringComparers
.ResourceName)
402
: new HashSet<string>(allSnapshots.Where(IsHiddenResource).Select(s => s.Name),
StringComparers
.ResourceName);
Backchannel\ResourceSnapshotWatcher.cs (2)
19
private readonly Dictionary<string, ResourceSnapshot> _resources = new(
StringComparers
.ResourceName);
48
_pendingUpdates = new Dictionary<string, ResourceSnapshotUpdate>(
StringComparers
.ResourceName);
Commands\AgentInitCommand.cs (2)
947
: entries.GroupBy(entry => entry.Client.Id,
StringComparers
.AgentClientId).Select(agent =>
950
string.Join(", ", agent.Select(entry => entry.Result.TargetPath).Distinct(
StringComparers
.FileSystemPath)
Commands\AppHostLauncher.cs (1)
727
return
StringComparers
.FileSystemPath.Equals(
Commands\DescribeCommand.cs (3)
250
var resourcesByDisplayName = graphResources.ToLookup(r => r.DisplayName,
StringComparers
.ResourceName);
281
var lastDisplayedContent = new Dictionary<string, object>(
StringComparers
.ResourceName);
339
.ToDictionary(item => item.Name, item => item.index,
StringComparers
.ResourceName);
Commands\ExportCommand.cs (1)
235
? new HashSet<string>(ResourceSnapshotMapper.WhereMatchesResourceName(snapshots, resourceName).Select(s => s.Name),
StringComparers
.ResourceName)
Commands\RenderCommand.cs (2)
60
private static readonly Dictionary<string, string> s_publishSummaryScenarioDescriptions = new(
StringComparers
.CommandName)
195
return RenderPublishSummaryScenarios(s_publishSummaryScenarioDescriptions.Keys.Where(k => !
StringComparers
.CommandName.Equals(k, "publish-summary-all")));
Commands\ResourceCommand.cs (4)
60
private static readonly Dictionary<string, (string ProgressVerb, string BaseVerb, string PastTenseVerb)> s_wellKnownCommands = new(
StringComparers
.CommandName)
72
private static readonly Dictionary<string, string> s_legacyCommandNameMap = new(
StringComparers
.CommandName)
242
.GroupBy(static command => command.Name,
StringComparers
.CommandName)
243
.OrderBy(static group => group.Key,
StringComparers
.CommandName)
Commands\StopCommand.cs (1)
394
StringComparers
.FileSystemPath.Equals(
Commands\TemplateManagementCommand.cs (1)
103
var orderedSources = sources.OrderBy(source => source.Key,
StringComparers
.TemplateSourceName)
Commands\TerminalResourceResolver.cs (1)
47
string.Join(", ", matches.Select(s => s.Name).Order(
StringComparers
.ResourceName))));
Configuration\ConfigSourceService.cs (2)
307
}.OfType<string>().Distinct(
StringComparers
.FileSystemPath);
695
if (_projectDirectory is not null && !
StringComparers
.FileSystemPath.Equals(_projectDirectory, path))
DotNet\DotNetAppHostRestorePreview.cs (1)
73
foreach (var path in new[] { rootProject.FullName }.Concat(projectRestoreTargets.Keys).Distinct(
StringComparers
.FileSystemPath))
DotNet\DotNetAppHostUpdateTransaction.cs (2)
24
StringComparers
.FileSystemPath);
31
.Distinct(
StringComparers
.FileSystemPath).ToArray();
Mcp\Tools\ListResourcesTool.cs (6)
337
var displayNameCounts = new Dictionary<string, int>(
StringComparers
.ResourceName);
347
StringComparers
.ResourceName);
379
.ToHashSet(
StringComparers
.ResourceName);
380
var targets = new Dictionary<string, List<string>>(
StringComparers
.ResourceName);
402
if (!displayTargets.Contains(snapshot.Name,
StringComparers
.ResourceName))
429
var seenReferences = new HashSet<string>(
StringComparers
.ResourceName);
Mcp\Tools\McpToolHelpers.cs (1)
461
var excludedNames = new HashSet<string>(
StringComparers
.ResourceName);
Mcp\Tools\WaitForResourcesTool.cs (3)
145
.Distinct(
StringComparers
.ResourceName)
166
.DistinctBy(static target => target.Name,
StringComparers
.ResourceName)
179
StringComparers
.ResourceName);
Packaging\IntegrationPackageSearchService.cs (1)
100
var polyglotIds = new HashSet<string>(
StringComparers
.NuGetPackageId);
Packaging\PackageChannel.cs (9)
417
.GroupBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
419
.OrderBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
512
.ToHashSet(
StringComparers
.NuGetPackageId);
520
var ids = new HashSet<string>(
StringComparers
.NuGetPackageId);
879
.Distinct(
StringComparers
.NuGetPackageId)
918
var resolvedPackageIds = new HashSet<string>(packageIds,
StringComparers
.NuGetPackageId);
929
.GroupBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
933
StringComparers
.NuGetPackageId);
986
.Distinct(
StringComparers
.NuGetPackageId)
Profiling\ProfileCaptureEnvironment.cs (2)
29
var previousValues = new Dictionary<string, string?>(
StringComparers
.EnvironmentVariableName);
69
return new Dictionary<string, string?>(
StringComparers
.EnvironmentVariableName)
Projects\DotNetBasedAppHostServerProject.cs (1)
178
var addedProjects = new HashSet<string>(
StringComparers
.FileSystemPath);
Projects\ProjectUpdater.cs (4)
39
var originalConfigurations = new Dictionary<string, byte[]?>(
StringComparers
.FileSystemPath);
2018
public Dictionary<string, string> ProjectRestoreTargets { get; } = new(
StringComparers
.FileSystemPath);
2019
public Dictionary<string, string> AmbientPolicies { get; } = new(
StringComparers
.FileSystemPath);
2020
public Dictionary<string, byte[]?> OriginalFiles { get; } = new(
StringComparers
.FileSystemPath);
src\Shared\AppHostSocketManager.cs (2)
117
.Distinct(
StringComparers
.FileSystemPath);
235
foreach (var socketPath in socketPaths.Distinct(
StringComparers
.FileSystemPath))
src\Shared\BackchannelConstants.cs (1)
344
return results.Distinct(
StringComparers
.FileSystemPath).ToArray();
src\Shared\ContainerRuntimeDetector.cs (1)
48
.Where(runtime => supportedRuntimes is null || supportedRuntimes.Contains(runtime.Key,
StringComparers
.ContainerRuntime))
src\Shared\Model\KnownProperties.cs (1)
11
/// Should be compared using <see cref="
StringComparers
.ResourcePropertyName"/>.
Templating\ConfiguredTemplateSourceService.cs (1)
94
.ThenBy(result => result.SourceName,
StringComparers
.TemplateSourceName)
Utils\ConsoleActivityLogger.cs (5)
526
.ThenBy(r => r.DisplayName,
StringComparers
.CommandName)
528
var recordsByKey = orderedRecords.ToDictionary(r => r.Key,
StringComparers
.CommandName);
529
var childrenByParent = new Dictionary<string, List<StepDurationRecord>>(
StringComparers
.CommandName);
554
:
StringComparers
.CommandName.Compare(left.DisplayName, right.DisplayName);
559
var visited = new HashSet<string>(
StringComparers
.CommandName);
Aspire.Cli.Tests (14)
Agents\LocalAspireSkillsTests.cs (6)
37
Assert.Equal(paths.Order(
StringComparers
.FileSystemPath), result.Files);
62
Assert.Equal(new[] { path, empty }.Order(
StringComparers
.FileSystemPath), result.Files);
80
Assert.Equal(new[] { project, user }.Order(
StringComparers
.FileSystemPath), result.Files);
117
Assert.Equal(paths.Order(
StringComparers
.FileSystemPath), result.Files);
147
Assert.Equal(paths.Order(
StringComparers
.FileSystemPath), result.Files);
211
Assert.Equal(paths.Order(
StringComparers
.FileSystemPath), result.Files);
Commands\AgentInitClientSelectionTests.cs (3)
176
Assert.Equal(expectedClients.Split(','), agentPrompt.PreSelected.Cast<IAgentClient>().Select(client => client.Id),
StringComparers
.AgentClientId);
180
var defaults = clients.Where(client => expectedClients.Split(',').Contains(client.Id,
StringComparers
.AgentClientId)).ToArray();
368
Assert.Equal(["copilot", "claude", "opencode"], choices.Cast<IAgentClient>().Select(client => client.Id),
StringComparers
.AgentClientId);
Commands\DescribeCommandTests.cs (3)
496
.GroupBy(resource => resource.Name!,
StringComparers
.ResourceName)
497
.ToDictionary(group => group.Key, group => group.Select(resource => resource.State).ToList(),
StringComparers
.ResourceName);
502
var expectedStates = changedSnapshots.Any(changed =>
StringComparers
.ResourceName.Equals(changed.Name, snapshot.Name))
Mcp\WaitForResourcesToolTests.cs (1)
448
var responses = new Dictionary<string, WaitForResourceResponse>(
StringComparers
.ResourceName)
TestServices\TestAuxiliaryBackchannelMonitor.cs (1)
13
private readonly ConcurrentDictionary<string, IAppHostAuxiliaryBackchannel> _connectionsBySocketPath = new(
StringComparers
.FileSystemPath);