198 references to Distinct
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
231var languages = refactorings.SelectMany(refactoring => refactoring.Metadata.Languages).Distinct();
Aspire.Dashboard (2)
Otlp\Storage\TelemetryRepository.cs (2)
447var keys = applicationKeys.Select(keys => keys.PropertyKey).Distinct(); 474var keys = applicationKeys.Select(keys => keys.PropertyKey).Distinct();
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
353UniqueSchemes = g.Select(e => e.UriScheme).Distinct().ToArray(),
BuildBoss (1)
CompilerNuGetCheckerUtil.cs (1)
285foreach (var packageFolder in packageInputs.Select(x => x.PackageFolderRelativePath).Distinct().OrderBy(x => x))
CodeGenerator (3)
HttpUtilities\HttpUtilities.cs (1)
122var distinctLengths = methodsInfo.Select(m => m.MaskLength).Distinct().ToList();
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
403var useVarForFirstTerm = values.Count > 1 && values.Select(h => h.FirstNameIgnoreCaseSegment()).Distinct().Count() == 1; 784.Select(h => h.Identifier).Distinct().OrderBy(n => n, StringComparer.InvariantCulture).ToArray();
CSharpSyntaxGenerator (4)
AbstractFileWriter.cs (1)
388return field.Kinds.Distinct().ToList();
SourceWriter.cs (3)
526var kinds = nd.Kinds.Distinct().ToList(); 561var kinds = field.Kinds.Distinct().ToList(); 1435var kinds = nd.Kinds.Distinct().ToList();
dotnet-svcutil-lib (3)
Metadata\MetadataDocumentSaver.cs (1)
63DocumentSaveErrors = metadataDocumentSaver.UnresolvedReferences.Distinct().OrderBy(ur => ur.Uri).Select(ur => string.Format(CultureInfo.CurrentCulture, MetadataResources.ErrUnableToResolveSchemaReferenceFormat, ur.Uri))
Tool.cs (2)
108foreach (string warning in earlyWarnings.Distinct()) 122foreach (string warning in options.Warnings.Distinct().Except(earlyWarnings))
IdeBenchmarks (1)
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
44.Distinct();
illink (1)
Microsoft.AspNetCore.Authorization (1)
AuthorizationPolicyBuilder.cs (1)
229return new AuthorizationPolicy(Requirements, AuthenticationSchemes.Distinct());
Microsoft.AspNetCore.Components.Endpoints.Tests (1)
RazorComponentsServiceCollectionExtensionsTest.cs (1)
133else if (implementationTypes.Length != implementationTypes.Distinct().Count())
Microsoft.AspNetCore.Components.Tests (2)
StackObjectPoolTest.cs (2)
74Assert.Equal(3, new[] { instance1, instance2, instance3 }.Distinct().Count()); 86Assert.Equal(4, new[] { instance1, instance2, instance3, instance2b }.Distinct().Count());
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
DatabaseDeveloperPageExceptionFilter.cs (1)
61.Distinct(); // Workaround for https://github.com/dotnet/efcore/issues/22341
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
418foreach (var serviceType in services.Select(d => d.ServiceType).Where(t => !t.IsGenericTypeDefinition).Distinct())
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\KnownHeaders.cs (2)
403var useVarForFirstTerm = values.Count > 1 && values.Select(h => h.FirstNameIgnoreCaseSegment()).Distinct().Count() == 1; 784.Select(h => h.Identifier).Distinct().OrderBy(n => n, StringComparer.InvariantCulture).ToArray();
Microsoft.AspNetCore.SignalR.Core (1)
Internal\TypedClientBuilder.cs (1)
149paramTypes.Where(p => p.IsGenericParameter).Select(p => p.Name).Distinct().ToArray();
Microsoft.Build (1)
Definition\ToolsetConfigurationReader.cs (1)
247.Distinct()
Microsoft.Build.Engine.UnitTests (1)
Graph\GraphLoadedFromSolution_tests.cs (1)
690graph.ProjectNodes.Count.ShouldBe(graph.ProjectNodes.Select(GetProjectPath).Distinct().Count());
Microsoft.Build.Framework (1)
XamlTypes\ProjectSchemaDefinitions.cs (1)
45return Nodes.SelectMany(node => node.GetSchemaObjectTypes()).Distinct();
Microsoft.CodeAnalysis (5)
CommandLine\ReportAnalyzerUtil.cs (1)
96var analyzerIds = string.Join(", ", GetSupportedIds(kvp.Key).Distinct().OrderBy(id => id));
Compilation\Compilation.cs (1)
840foreach (var r in references.Distinct())
Emit\CommonPEModuleBuilder.cs (1)
812NestedTypes.Select(t => t.Name).Distinct().Count() == NestedTypes.Count());
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
1326Debug.Assert(debugTokens.Distinct().Count() == debugTokens.Count);
MetadataReader\PEModule.cs (1)
864from fullName in fullNamespaceNames.Distinct()
Microsoft.CodeAnalysis.CodeStyle (6)
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
595foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
194if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
385interfaces.SelectMany(i => i.GetAllInterfacesIncludingThis()).Distinct());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
272var tokens = node.GetAnnotatedTrivia(SyntaxAnnotation.ElasticAnnotation).Select(tr => tr.Token).Distinct();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
120.Distinct();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
221var orderedTokens = tokens.Distinct().OrderBy(t => t.SpanStart);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
155.Distinct()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
79.Distinct()
Microsoft.CodeAnalysis.CSharp (2)
Symbols\SubstitutedNamedTypeSymbol.cs (2)
192return new List<string>(GetTypeMembersUnordered().Select(s => s.Name).Distinct()); 197return GetMembers().Select(s => s.Name).Distinct();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\CodeCleanupTests.cs (1)
637Assert.Equal(supportedDiagnostics, supportedDiagnostics.Distinct());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4153var syntaxKinds = baseListNode.DescendantNodesAndSelf().Select(node => node.Kind()).Distinct().AsImmutable();
Microsoft.CodeAnalysis.CSharp.Features (1)
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithExplicitInitializerDeclarationBody.cs (1)
30=> model.AnalyzeDataFlow(Initializer)!.CapturedInside.AddRange(model.AnalyzeDataFlow(Body).CapturedInside).Distinct();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\ImportsTests.cs (1)
144var externAliases = compilationUnits.SelectMany(cu => cu.Externs).Select(e => e.Identifier.ValueText).Distinct();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\Source\BaseClassTests.cs (2)
1072var B1 = global1.GetTypeMembers("ClassB", 0).Distinct().Single(); 1188var B1 = global1.GetTypeMembers("ClassB", 0).Distinct().Single();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
CompilationTestUtils.cs (1)
350return symbols.Select(s => s.Name).Distinct().ToList();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Rename\CSharpRenameRewriterLanguageService.cs (1)
864AddConflictingParametersOfProperties(properties.Distinct(), replacementText, conflicts);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Completion\AbstractCompletionProviderTests.cs (1)
307Assert.Equal(matchingFilters.Count, matchingFilters.Distinct().Count());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Diagnostics\IDEDiagnosticIDUniquenessTest.cs (1)
21Assert.Equal(listOfIDEDiagnosticIds.Count, listOfIDEDiagnosticIds.Distinct().Count());
Workspaces\ClassificationTypeNamesTests.cs (1)
46=> Assert.Equal(ClassificationTypeNames.AllTypeNames.Distinct(), ClassificationTypeNames.AllTypeNames);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Internal\NavigateTo\FSharpNavigateToSearchService.cs (1)
59Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
SignatureHelp\FSharpSignatureHelpItems.cs (1)
82var distinctItems = items.Distinct().ToList();
Microsoft.CodeAnalysis.Features (20)
AddImport\SymbolReferenceFinder.cs (1)
141.Distinct()
EditAndContinue\EmitSolutionUpdateResults.cs (1)
263.Distinct()
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (1)
61Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
FullyQualify\AbstractFullyQualifyService.cs (2)
100.Distinct() 312=> symbols.Distinct()
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.State.cs (1)
59var mappedMembers = selectedMembers.Select(m => TryMapToWritableInstanceFieldOrProperty(service, m, cancellationToken)).Distinct().ToImmutableArray();
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (1)
283.Distinct()
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
72Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
33Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
80Contract.ThrowIfTrue(projects.Select(p => p.Language).Distinct().Count() != 1);
Organizing\AbstractOrganizingService.cs (1)
41select o).Distinct();
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (1)
190var allReferenceDocuments = getReferencesByDocument.Concat(setReferencesByDocument).Select(g => g.Key).Distinct();
SignatureHelp\SignatureHelpItems.cs (1)
77var distinctItems = items.Distinct().ToList();
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
595foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
194if (!namedType.DeclaringSyntaxReferences.Select(d => d.SyntaxTree).Distinct().Any(tree =>
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (1)
155.Distinct()
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
45Debug.Assert(diagnostics.Select(diagnostic => diagnostic.Properties[MatchFolderAndNamespaceConstants.TargetNamespace]).Distinct().Count() == 1);
UnusedReferences\ProjectAssets\ProjectAssetsReader.cs (1)
50.Distinct()
Wrapping\AbstractCodeActionComputer.cs (2)
226var tokens = leftTokenToTrailingTrivia.Keys.Concat(rightTokenToLeadingTrivia.Keys).Distinct().ToImmutableArray(); 246tokens: leftTokenToTrailingTrivia.Keys.Concat(rightTokenToLeadingTrivia.Keys).Distinct(),
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
45Assert.True(results.Distinct().Count() == results.Count);
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RudeEditDiagnosticTests.cs (1)
116AssertEx.Equal(allKinds, allKinds.Distinct());
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\ProjectDependencyHelper.cs (1)
133var unresolvedParams = new UnresolvedDependenciesParams([.. projectPaths.Distinct()]);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
45foreach (var languageName in context.Solution.Projects.Select(p => p.Language).Distinct())
Microsoft.CodeAnalysis.Scripting (2)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (1)
121return q.Distinct();
src\Compilers\Shared\GlobalAssemblyCacheHelpers\MonoGlobalAssemblyCache.cs (1)
162Select(identityAndPath => identityAndPath.Identity.Name).Distinct();
Microsoft.CodeAnalysis.Test.Utilities (6)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
2824var trees = symbol.DeclaringSyntaxReferences.Select(syntaxRef => syntaxRef.SyntaxTree).Distinct();
Diagnostics\ThrowingDiagnosticAnalyzer.cs (1)
81var diagnostics = (await runAnalysis(analyzer)).Distinct();
Diagnostics\TrackingDiagnosticAnalyzer.cs (4)
76var actualMembers = _callLog.Select(e => e.CallerName).Distinct(); 87var actualSymbolKinds = _callLog.Where(a => FilterByAbstractName(a, "Symbol")).Where(e => e.SymbolKind.HasValue).Select(e => e.SymbolKind.Value).Distinct(); 145.Select(e => new { SymbolKind = e.SymbolKind.Value, MethodKind = e.MethodKind ?? InvalidMethodKind, e.ReturnsVoid }).Distinct(); 147.Select(e => new { SymbolKind = e.SymbolKind.Value, MethodKind = e.MethodKind ?? InvalidMethodKind, e.ReturnsVoid }).Distinct();
Microsoft.CodeAnalysis.Workspaces (17)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
72var changesToApply = _totalChangesIntervalTree.Distinct().OrderBy(tc => tc.Span.Start);
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
152foreach (var reference in project.MetadataReferences.OfType<PortableExecutableReference>().Distinct())
Rename\ConflictEngine\ConflictResolver.cs (1)
154foreach (var language in projectIds.Select(p => solution.GetRequiredProject(p).Language).Distinct())
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
715foreach (var language in documentsFromAffectedProjects.Select(d => d.Project.Language).Distinct())
Rename\RenameUtilities.cs (2)
95.Select(d => d.ProjectId).Distinct(); 109solution.GetProjectDependencyGraph().GetProjectsThatDirectlyDependOnThisProject(p))).Distinct();
Shared\Extensions\ILanguageMetadataExtensions.cs (1)
51foreach (var language in service.Metadata.Languages.Distinct())
Shared\Utilities\SemanticMap.cs (1)
35return _expressionToInfoMap.Values.Concat(_tokenToInfoMap.Values).Select(info => info.Symbol).Distinct();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\INamedTypeSymbolExtensions.cs (1)
385interfaces.SelectMany(i => i.GetAllInterfacesIncludingThis()).Distinct());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
272var tokens = node.GetAnnotatedTrivia(SyntaxAnnotation.ElasticAnnotation).Select(tr => tr.Token).Distinct();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
120.Distinct();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (1)
221var orderedTokens = tokens.Distinct().OrderBy(t => t.SpanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\TypeInferenceService\AbstractTypeInferenceService.AbstractTypeInferrer.cs (1)
79.Distinct()
Workspace\CommandLineProject.cs (2)
65var boundMetadataReferences = commandLineArguments.ResolveMetadataReferences(commandLineMetadataReferenceResolver).Distinct().ToList(); 78var boundAnalyzerReferences = commandLineArguments.ResolveAnalyzerReferences(analyzerLoader).Distinct().ToList();
Workspace\DocumentTracking\IDocumentTrackingServiceExtensions.cs (1)
31.Distinct()
Workspace\Host\Mef\MefHostServices.cs (1)
50var compositionConfiguration = new ContainerConfiguration().WithAssemblies(assemblies.Distinct());
Microsoft.DotNet.Arcade.Sdk (2)
src\GenerateResxSource.cs (1)
508.Distinct();
src\SourceBuild\AddSourceMappingToNugetConfig.cs (1)
52.Distinct()
Microsoft.DotNet.Arcade.Sdk.Tests (1)
SourceMappingToNugetConfigTest.cs (1)
66.Distinct()
Microsoft.DotNet.Build.Tasks.Feed (3)
src\model\SetupTargetFeedConfigV3.cs (1)
86return Feeds().Distinct().ToList();
src\PublishArtifactsInManifestBase.cs (1)
729string[] symbolPackagesAssetNames = buildAssets?.Keys.Where(x => IsSymbolPackage(x)).Distinct().ToArray() ?? [];
src\PublishArtifactsInManifestV3.cs (1)
108foreach (var targetChannelId in targetChannelsIds.Distinct())
Microsoft.DotNet.Build.Tasks.Packaging (6)
GetApplicableAssetsFromPackageReports.cs (1)
94BuildProjects = buildProjects.Distinct().Select(bp => bp.ToItem()).ToArray();
GetApplicableAssetsFromPackages.cs (1)
142BuildProjects = buildProjects.Distinct().Select(bp => bp.ToItem()).ToArray();
PackageIndex.cs (1)
258return Packages.Values.SelectMany(info => info.InboxOn.GetInboxFrameworks()).Distinct().ToArray();
SplitDependenciesBySupport.cs (1)
45.Distinct()
UpdatePackageIndex.cs (2)
221var dllNames = dlls.Select(f => Path.GetFileNameWithoutExtension(f)).Distinct(); 257dllNames = dlls.Select(f => Path.GetFileNameWithoutExtension(f)).Distinct().ToArray();
Microsoft.DotNet.Build.Tasks.VisualStudio (2)
OptProf\GetRunSettingsSessionConfiguration.cs (2)
136.Distinct() 154.Distinct()
Microsoft.DotNet.GenFacades (1)
GenPartialFacadeSourceGenerator.cs (1)
37string[] distinctSeeds = seeds.Select(seed => Path.GetFullPath(seed)).Distinct().ToArray();
Microsoft.DotNet.NuGetRepack.Tasks (1)
src\UpdatePackageVersionTask.cs (1)
91File.WriteAllLines(Path.Combine(OutputDirectory, "PreReleaseDependencies.txt"), preReleaseDependencies.Distinct());
Microsoft.DotNet.PackageTesting (3)
GetCompatiblePackageTargetFrameworks.cs (1)
81return frameworksToTest.Where(tfm => allTargetFrameworks.Contains(tfm)).Distinct();
Package.cs (2)
33FrameworksInPackageList.AddRange(RuntimeAssets.Select(t => (NuGetFramework)t.Properties["tfm"]).Distinct()); 35FrameworksInPackage = FrameworksInPackageList.Distinct();
Microsoft.DotNet.RemoteExecutor (1)
RemoteExecutor.cs (1)
647.Distinct();
Microsoft.DotNet.SourceBuild.Tasks (9)
src\UsageReport\ValidateUsageAgainstBaseline.cs (3)
80used.Usages.Select(u => u.GetIdentityWithoutRid()).Distinct(), 81baseline.Usages.Select(u => u.GetIdentityWithoutRid()).Distinct()); 128used.Usages = used.Usages.Distinct().ToArray();
src\UsageReport\WritePackageUsageData.cs (6)
104.Distinct() 111.Distinct() 116.Distinct() 121.Distinct() 126.Distinct() 195.Distinct(),
Microsoft.DotNet.VersionTools (1)
Automation\DependencyUpdateUtils.cs (1)
31.Distinct()
Microsoft.DotNet.VersionTools.Tasks (1)
UpdateToRemoteDependencies.cs (1)
75.Distinct()
Microsoft.Extensions.DependencyModel (1)
DependencyContextWriter.cs (1)
151foreach (string packageName in runtimeLookup.Keys.Concat(compileLookup.Keys).Distinct())
Microsoft.Extensions.Http.Resilience.Tests (3)
Hedging\HedgingTests.cs (3)
178Assert.Equal(2, Requests.Distinct().Count()); 226RequestContexts.Distinct().OfType<ResilienceContext>().Should().HaveCount(3); 252RequestContexts.Distinct().OfType<ResilienceContext>().Should().HaveCount(3);
Microsoft.Extensions.Identity.Core (3)
PasswordValidator.cs (1)
71if (options.RequiredUniqueChars >= 1 && password.Distinct().Count() < options.RequiredUniqueChars)
UserManager.cs (2)
1131foreach (var role in roles.Distinct()) 2011await store.ReplaceCodesAsync(user, newCodes.Distinct(), CancellationToken).ConfigureAwait(false);
Microsoft.Gen.ComplianceReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
83process(compilation, nodes.Distinct(), spc);
Microsoft.Gen.ContextualOptions (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
83process(compilation, nodes.Distinct(), spc);
Microsoft.Gen.Logging (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
83process(compilation, nodes.Distinct(), spc);
Microsoft.Gen.Metrics (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
83process(compilation, nodes.Distinct(), spc);
Microsoft.Gen.MetricsReports (1)
src\Generators\Shared\GeneratorUtilities.cs (1)
83process(compilation, nodes.Distinct(), spc);
Microsoft.Interop.ComInterfaceGenerator (1)
VtableIndexStubGenerator.cs (1)
112.SelectMany(static (syntaxContexts, ct) => syntaxContexts.Distinct())
Microsoft.ML.AutoML (2)
API\AutoCatalog.cs (1)
758Contracts.Assert(overallColumns.Count() == overallColumns.Distinct().Count(), "detect overlapping among catalogColumns, numericColumns, textColumns and excludedColumns");
TransformInference\TransformInference.cs (1)
472return ColumnConcatenatingExtension.CreateSuggestedTransform(context, concatColNames.Distinct().ToArray(), DefaultColumnNames.Features);
Microsoft.ML.AutoML.Tests (6)
GridSearchTunerTests.cs (1)
55parameters.Distinct().Count().Should().Be(steps);
TrainerExtensionsTests.cs (5)
359Assert.Equal(publicNames.Distinct().Count(), internalNames.Distinct().Count()); 367Assert.Equal(publicNames.Distinct().Count(), internalNames.Distinct().Count()); 375Assert.Equal(publicNames.Distinct().Count(), internalNames.Distinct().Count()); 383Assert.Equal(publicNames.Distinct().Count(), internalNames.Distinct().Count()); 391Assert.Equal(publicNames.Distinct().Count(), internalNames.Distinct().Count());
Microsoft.ML.CodeGenerator (2)
CodeGenerator\CSharp\CodeGenerator.cs (1)
225usings = usings.Distinct().ToList();
CodeGenerator\CSharp\PipelineExtension.cs (1)
43usings = usings.Distinct().ToList();
Microsoft.ML.Core (4)
ComponentModel\ComponentCatalog.cs (2)
623var names = (info.Aliases ?? new string[0]).Concat(new[] { info.Name }).Distinct(); 909return _components.Select(x => x.Kind).Distinct().OrderBy(x => x);
SearchSpace\ChoiceAttribute.cs (2)
22var candidatesType = candidates.Select(o => o.GetType()).Distinct(); 33var candidatesType = candidates.Select(o => o.GetType()).Distinct();
Microsoft.ML.Core.Tests (2)
UnitTests\TestVBuffer.cs (2)
420indices = indices.Distinct().OrderBy(x => x); 504.Union(b.Items().Select(iv => iv.Key)).Distinct().OrderBy(x => x).ToArray();
Microsoft.ML.Data (3)
Commands\TypeInfoCommand.cs (1)
87var kinds = Enum.GetValues(typeof(InternalDataKind)).Cast<InternalDataKind>().Distinct().OrderBy(k => k).ToArray();
DataView\Transposer.cs (1)
98IEnumerable<int> columnSet = columns.Distinct().OrderBy(c => c);
EntryPoints\EntryPointNode.cs (1)
789return _inputMap.Where(kv => !_inputBuilder.IsInputOptional(kv.Key.ParameterName)).Select(kv => kv.Value).Distinct()
Microsoft.ML.EntryPoints (1)
JsonUtils\JsonManifestUtils.cs (1)
60foreach (var epKind in kinds.Distinct().OrderBy(k => k.Name))
Microsoft.ML.Fairlearn (1)
Reductions\Utilities.cs (1)
20var sensitiveFeatureColumnValue = moment.SensitiveFeatureColumn.Cast<string>().Distinct();
Microsoft.ML.FastTree (5)
Dataset\Dataset.cs (3)
295ulong[] uniqueQueryIds = queryIndices.Distinct().Select(q => QueryIds[q]).ToArray(); 341newAuxData[pair.Key] = pair.Value.GetSubset(pair.Value.IsQueryLevel ? queryIndices.Distinct().ToArray() : docIndices); 845IEnumerable<string> typeNameEnumerable = arrays.Select(x => x.GetType().GetElementType()).Distinct().Select(x => x.Name).OrderBy(n => n);
Dataset\DatasetUtils.cs (1)
49foreach (uint uintQid in skel.QueryIds.Select(qid => (uint)qid).Distinct().OrderBy(x => x))
TreeEnsemble\InternalTreeEnsemble.cs (1)
408combinedKeys = Keys.Union(currentGains.Keys).Distinct().ToList();
Microsoft.ML.SearchSpace (1)
Option\ChoiceOption.cs (1)
29var distinctChoices = choices.Distinct();
Microsoft.ML.Tests (3)
Transformers\CategoricalHashTests.cs (3)
172System.Diagnostics.Trace.WriteLine(slots.Items().Select(x => x.Value.ToString()).Distinct()); 173var temp = slots.Items().Select(x => x.Value.ToString()).Distinct(); 174Assert.Equal(slots.Items().Select(x => x.Value.ToString()).Distinct(), new string[14] { "[0].", "[0].0:A", "[0].0:E", "[0].0:D", "[0].1:A", "[0].1:E", "[0].1:D", "[1].", "[1].0:A", "[1].0:E", "[1].0:D", "[1].1:A", "[1].1:E", "[1].1:D" });
Microsoft.ML.Transforms (6)
Expression\LambdaBinder.cs (2)
1351var arities = candidates.Select(c => c.Arity).Distinct().OrderBy(x => x).ToArray(); 1365var kindsRet = candidates.Select(c => c.ReturnKind).Distinct().ToArray();
HashJoiningTransform.cs (3)
265Host.CheckDecode(slotMap[j].Distinct().Count() == slotMap[j].Length); 323Host.Assert(ex.SlotMap[i].Distinct().Count() == ex.SlotMap[i].Length); 363if (slots.Distinct().Count() < slots.Length)
UngroupTransform.cs (1)
114Host.CheckUserArg(options.Columns.Distinct().Count() == options.Columns.Length, nameof(options.Columns),
Microsoft.VisualStudio.LanguageServices (4)
ColorSchemes\ColorSchemeApplier.ClassificationVerifier.cs (2)
86var coreClassifications = DarkThemeForeground.Keys.Concat(BlueLightThemeForeground.Keys).Distinct(); 87var colorSchemeClassifications = _colorSchemes.Values.SelectMany(scheme => scheme.Values.SelectMany(theme => theme.Keys)).Distinct();
Progression\GraphQueries\InheritsGraphQuery.cs (1)
43foreach (var baseNode in namedType.OriginalDefinition.AllInterfaces.Distinct())
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
72foreach (var projectId in documentIds.Select(i => i.ProjectId).Distinct())
System.ComponentModel.Composition (4)
System\ComponentModel\Composition\Hosting\ExportsChangeEventArgs.cs (1)
100.Distinct()
System\ComponentModel\Composition\Hosting\ImportEngine.PartManager.cs (1)
68return _importedContractNames ??= Part.ImportDefinitions.Select(import => import.ContractName ?? ImportDefinition.EmptyContractName).Distinct().ToArray();
System\ComponentModel\Composition\Hosting\TypeCatalog.cs (1)
322foreach (string contractName in part.ExportDefinitions.Select(export => export.ContractName).Distinct())
System\ComponentModel\Composition\ReflectionModel\ReflectionModelServices.cs (1)
364.Distinct()
System.Linq.Queryable (2)
System\Linq\EnumerableRewriter.cs (2)
182.Distinct() 191.Distinct()
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
56Debug.Assert(s_validKeys.Distinct().Count() == s_validKeys.Length);
System.Windows.Forms.PrivateSourceGenerators (1)
System\Windows\Forms\SourceGenerators\EnumValidationInfo.cs (1)
12var values = GetElementValues(enumType).OrderBy(e => e).Distinct().ToImmutableArray();