96 references to StringComparers
aspire (84)
Agents\AgentConfiguration.cs (4)
16
private readonly Dictionary<string, byte[]?> _files = new(
StringComparers
.FileSystemPath);
17
private readonly Dictionary<string, (bool Exists, string[] Files)> _directories = new(
StringComparers
.FileSystemPath);
25
foreach (var targets in clients.Distinct().GroupBy(client => Path.GetFullPath(client.GetIntegrationConfigPath(scope, workspaceRoot)),
StringComparers
.FileSystemPath))
194
if (previous.Exists != current.Exists || !previous.Files.SequenceEqual(current.Files,
StringComparers
.FileSystemPath))
Agents\AspireSkills\AspireSkillsRemoteConfiguration.cs (1)
241
foreach (var path in paths.Distinct(
StringComparers
.FileSystemPath))
Agents\AspireSkills\LocalAspireSkills.cs (1)
71
.OrderBy(entry => entry.Directory,
StringComparers
.FileSystemPath)
Agents\OpenCode\OpenCodeAgentClient.cs (3)
77
var candidateConfig =
StringComparers
.FileSystemPath.Equals(candidate, configFilePath)
210
.Concat(GlobalCatalogSettings()).Distinct(
StringComparers
.FileSystemPath);
222
.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)
190
var seenDependencies = new HashSet<string>(
StringComparers
.ResourceName);
402
? new HashSet<string>(
StringComparers
.ResourceName)
403
: 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 (4)
1022
foreach (var directory in installedSkills.Select(static skill => skill.Directory).Distinct(
StringComparers
.FileSystemPath))
1025
StringComparers
.FileSystemPath.Equals(directory, client.GetSkillBaseDirectory(scope, workspaceRoot)))
1100
copy.Owners.Contains(client.Id,
StringComparers
.AgentClientId)))
1251
StringComparers
.FileSystemPath.Equals(Path.TrimEndingDirectorySeparator(left), Path.TrimEndingDirectorySeparator(right));
Commands\AppHostLauncher.cs (1)
746
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)
111
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 (1)
881
if (_projectDirectory is not null && !
StringComparers
.FileSystemPath.Equals(_projectDirectory, path))
DotNet\DotNetAppHostRestorePreview.cs (1)
99
foreach (var path in candidate is null ? [] : new[] { rootProject.FullName }.Concat(projectRestoreTargets.Keys).Distinct(
StringComparers
.FileSystemPath))
DotNet\DotNetAppHostUpdateTransaction.cs (5)
26
StringComparers
.FileSystemPath);
33
.Distinct(
StringComparers
.FileSystemPath).ToArray();
78
File.Move(temporary, backup, overwrite: existingBackups.Contains(backup,
StringComparers
.FileSystemPath));
81
if (existingBackups.Contains(otherBackup,
StringComparers
.FileSystemPath))
97
.Distinct(
StringComparers
.FileSystemPath).ToArray();
Mcp\Tools\ListResourcesTool.cs (6)
339
var displayNameCounts = new Dictionary<string, int>(
StringComparers
.ResourceName);
349
StringComparers
.ResourceName);
381
.ToHashSet(
StringComparers
.ResourceName);
382
var targets = new Dictionary<string, List<string>>(
StringComparers
.ResourceName);
404
if (!displayTargets.Contains(snapshot.Name,
StringComparers
.ResourceName))
431
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)
109
var polyglotIds = new HashSet<string>(
StringComparers
.NuGetPackageId);
Packaging\PackageChannel.cs (9)
500
.GroupBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
502
.OrderBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
594
.Distinct(
StringComparers
.NuGetPackageId)
608
var ids = new HashSet<string>(
StringComparers
.NuGetPackageId);
971
.Distinct(
StringComparers
.NuGetPackageId)
1010
var resolvedPackageIds = new HashSet<string>(packageIds,
StringComparers
.NuGetPackageId);
1021
.GroupBy(metadata => metadata.PackageId,
StringComparers
.NuGetPackageId)
1025
StringComparers
.NuGetPackageId);
1078
.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)
181
var addedProjects = new HashSet<string>(
StringComparers
.FileSystemPath);
Projects\ProjectUpdater.cs (4)
45
var originalConfigurations = new Dictionary<string, byte[]?>(
StringComparers
.FileSystemPath);
2125
public Dictionary<string, string> ProjectRestoreTargets { get; } = new(
StringComparers
.FileSystemPath);
2126
public Dictionary<string, string> AmbientPolicies { get; } = new(
StringComparers
.FileSystemPath);
2128
public Dictionary<string, byte[]?> OriginalFiles { get; } = new(
StringComparers
.FileSystemPath);
Scaffolding\ScaffoldingService.cs (1)
183
!
StringComparers
.FileSystemPath.Equals(directory.FullName, scaffoldDirectory.FullName))
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\Model\KnownProperties.cs (1)
11
/// Should be compared using <see cref="
StringComparers
.ResourcePropertyName"/>.
Templating\ConfiguredTemplateSourceService.cs (1)
98
.ThenBy(result => result.SourceName,
StringComparers
.TemplateSourceName)
Templating\TemplateSourceConfiguration.cs (1)
18
var sources = new Dictionary<string, T>(
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);
Utils\EnvironmentChecker\AspireSkillsCheck.cs (1)
34
.DistinctBy(copy => copy.Directory,
StringComparers
.FileSystemPath)
Aspire.Cli.Tests (12)
Agents\LocalAspireSkillsTests.cs (3)
38
names.Select(name => (Path.Combine(skills, name), AgentConfigurationScope.Project)).OrderBy(entry => entry.Item1,
StringComparers
.FileSystemPath),
66
paths.Select(path => (path, AgentConfigurationScope.Project)).OrderBy(entry => entry.path,
StringComparers
.FileSystemPath),
84
.OrderBy(entry => entry.Item1,
StringComparers
.FileSystemPath),
Commands\AgentInitClientSelectionTests.cs (3)
97
Assert.Equal(expectedClients.Split(','), agentPrompt.PreSelected.Cast<IAgentClient>().Select(client => client.Id),
StringComparers
.AgentClientId);
101
var defaults = clients.Where(client => expectedClients.Split(',').Contains(client.Id,
StringComparers
.AgentClientId)).ToArray();
292
Assert.Equal(["copilot", "claude", "opencode"], choices.Cast<IAgentClient>().Select(client => client.Id),
StringComparers
.AgentClientId);
Commands\DescribeCommandTests.cs (3)
609
.GroupBy(resource => resource.Name!,
StringComparers
.ResourceName)
610
.ToDictionary(group => group.Key, group => group.Select(resource => resource.State).ToList(),
StringComparers
.ResourceName);
615
var expectedStates = changedSnapshots.Any(changed =>
StringComparers
.ResourceName.Equals(changed.Name, snapshot.Name))
Commands\DoctorCommandTests.cs (1)
44
.Order(
StringComparers
.FileSystemPath).ToArray();
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);