22 references to DistinctBy
aspire (8)
Commands\AddCommand.cs (2)
450var distinctPackageIds = possiblePackages.DistinctBy(package => package.Package.Id); 473var distinctPackages = possiblePackages.DistinctBy(p => p.Package.Id).ToArray();
Packaging\PackageChannel.cs (5)
187.DistinctBy(p => $"{p.Id}-{p.Version}"); 236.DistinctBy(p => $"{p.Id}-{p.Version}"); 296.DistinctBy(metadata => metadata.Version) 529.DistinctBy(p => $"{p.Id}-{p.Version}"); 618.DistinctBy(p => $"{p.Id}-{p.Version}");
Packaging\PackageSourceOverrideMappings.cs (1)
81return [.. mappings.DistinctBy(static mapping => $"{mapping.PackageFilter}\0{mapping.Source}")];
Aspire.Dashboard (1)
Otlp\Storage\TelemetryRepository.cs (1)
2092.DistinctBy(s => s.GetKey())
Aspire.Hosting (2)
Dcp\CertificateUtilities.cs (1)
20}).DistinctBy(cert => cert.Thumbprint).ToList();
Health\ResourceHealthCheckService.cs (1)
133var registrationKeysToCheck = annotations.DistinctBy(a => a.Key).Select(a => a.Key).ToFrozenSet();
Aspire.Hosting.Azure (1)
AzureProvisioningResource.cs (1)
277var distinctInfrastructureParameters = infrastructureParameters.DistinctBy(p => p.BicepIdentifier);
Aspire.Hosting.Azure.Tests (3)
AzureInfrastructureExtensionsTests.cs (2)
55var infrastructureParameters = moduleInfrastructure.GetParameters().DistinctBy(x => x.BicepIdentifier); 94var infrastructureParameters = moduleInfrastructure.GetParameters().DistinctBy(x => x.BicepIdentifier);
BicepUtilitiesTests.cs (1)
74Assert.Collection(relationships.DistinctBy(r => (r.Resource, r.Type)),
Aspire.Hosting.Tests (1)
WithEnvironmentTests.cs (1)
260Assert.Collection(relationships.DistinctBy(r => (r.Resource, r.Type)),
dotnet (1)
SdkVulnerability\SdkVulnerabilityChecker.cs (1)
96cves = cves.DistinctBy(c => c.Id).ToList();
dotnet-aot (1)
src\sdk\src\Cli\dotnet\SdkVulnerability\SdkVulnerabilityChecker.cs (1)
96cves = cves.DistinctBy(c => c.Id).ToList();
Microsoft.AspNetCore.Components (1)
PersistentState\PersistentServicesRegistry.cs (1)
163internal static IPersistentServiceRegistration[] ResolveRegistrations(IEnumerable<IPersistentServiceRegistration> registrations) => [.. registrations.DistinctBy(r => (r.Assembly, r.FullTypeName)).OrderBy(r => r.Assembly).ThenBy(r => r.FullTypeName)];
Stress.ApiService (1)
TraceCreator.cs (1)
72var distinctLinks = links.DistinctBy(l => l.Context.SpanId).ToArray();
System.CommandLine.StaticCompletions (1)
HelpGenerationExtensions.cs (1)
87return myOptions.Concat(c.Parents.OfType<Command>().SelectMany(OptionsForParent)).DistinctBy(o => o.Name);
System.Linq (1)
System\Linq\Distinct.cs (1)
37/// <para>The <see cref="DistinctBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey})" /> method returns an unordered sequence that contains no duplicate values. The default equality comparer, <see cref="EqualityComparer{T}.Default" />, is used to compare values.</para>