237 implementations of IComparer
Aspire.Dashboard (3)
Model\ResourceViewModel.cs (1)
197public sealed class ResourceViewModelNameComparer : IComparer<ResourceViewModel>
Otlp\Model\OtlpInstrument.cs (1)
153private sealed class KeyValuePairComparer : IComparer<KeyValuePair<string, string>>
Otlp\Model\OtlpTrace.cs (1)
192private sealed class SpanStartDateComparer : IComparer<OtlpSpan>
CodeGenerator (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
1551private sealed class KnownHeaderComparer : IComparer<KnownHeader>
dotnet-svcutil-lib (6)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (1)
719private class DtdDefaultAttributeInfoToNodeDataComparer : IComparer<object>
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\SortQuery.cs (1)
151internal sealed class XPathSortComparer : IComparer<SortKey>
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (2)
1438internal class DataMemberConflictComparer : IComparer<Member> 1491internal class DataMemberComparer : IComparer<DataMember>
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceContractGenerator.cs (1)
663private class MessagePartDescriptionComparer : IComparer<MessagePartDescription>
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TimeBoundedCache.cs (1)
453internal class ExpirableItemComparer : IComparer<IExpirableItem>
GenerateDocumentationAndConfigFiles (5)
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (1)
420private sealed class ReverseComparer : IComparer<Version>
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Metrics (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Metrics.Legacy (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Microsoft.AspNetCore.Components (1)
Routing\QueryParameterNameComparer.cs (1)
8internal sealed class QueryParameterNameComparer : IComparer<ReadOnlyMemory<char>>, IEqualityComparer<ReadOnlyMemory<char>>
Microsoft.AspNetCore.Components.Endpoints (1)
FormMapping\PrefixResolver.cs (1)
45private class FormKeyComparer(bool checkPrefix) : IComparer<FormKey>
Microsoft.AspNetCore.Http.Extensions (1)
src\Components\Endpoints\src\FormMapping\PrefixResolver.cs (1)
45private class FormKeyComparer(bool checkPrefix) : IComparer<FormKey>
Microsoft.AspNetCore.Mvc.Core (1)
Filters\FilterDescriptorOrderComparer.cs (1)
6internal sealed class FilterDescriptorOrderComparer : IComparer<FilterDescriptor>
Microsoft.AspNetCore.Mvc.TagHelpers (1)
GlobbingUrlBuilder.cs (1)
173private sealed class PathComparer : IComparer<string>
Microsoft.AspNetCore.OutputCaching (1)
OutputCacheKeyProvider.cs (1)
354private sealed class QueryKeyComparer : IComparer<KeyValuePair<string, StringValues>>
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperRunner.cs (1)
62private readonly struct SortTagHelpers : IComparer<ITagHelper>
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingKeyProvider.cs (1)
193private sealed class QueryKeyComparer : IComparer<KeyValuePair<string, StringValues>>
Microsoft.AspNetCore.Routing (6)
Matching\EndpointComparer.cs (3)
23internal sealed class EndpointComparer : IComparer<Endpoint>, IEqualityComparer<Endpoint> 106private sealed class OrderComparer : IComparer<Endpoint> 133private sealed class PrecedenceComparer : IComparer<Endpoint>
Matching\EndpointMetadataComparer.cs (2)
17public sealed class EndpointMetadataComparer : IComparer<Endpoint> 76public abstract class EndpointMetadataComparer<TMetadata> : IComparer<Endpoint> where TMetadata : class
Tree\LinkGenerationDecisionTree.cs (1)
186private sealed class OutboundMatchResultComparer : IComparer<OutboundMatchResult>
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
Matching\MatcherBuilderMultipleEntryBenchmark.cs (1)
197private sealed class TestEndpointComparer : IComparer<Endpoint>
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\SniOptionsSelector.cs (1)
223private sealed class LongestStringFirstComparer : IComparer<string>
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Servers\Kestrel\shared\KnownHeaders.cs (1)
1551private sealed class KnownHeaderComparer : IComparer<KnownHeader>
Microsoft.Cci.Extensions (3)
Comparers\ApiComparer.cs (1)
11public sealed class ApiComparer<T> : IComparer<T>
Comparers\StringKeyComparer.cs (1)
9public class StringKeyComparer<T> : IComparer<T>, IEqualityComparer<T>
Comparers\TypeDefinitionComparer.cs (1)
8public sealed class TypeDefinitionComparer : IComparer<ITypeDefinition>
Microsoft.CodeAnalysis (6)
CodeGen\LocalScopeManager.cs (1)
876private sealed class ScopeComparer : IComparer<Cci.LocalScope>
CodeGen\PrivateImplementationDetails.cs (1)
608private sealed class FieldComparer : IComparer<SynthesizedStaticField>
Emit\NoPia\EmbeddedTypesManager.cs (1)
167private sealed class TypeComparer : IComparer<TEmbeddedType>
InternalUtilities\EnumField.cs (1)
71private class EnumFieldComparer : IComparer<EnumField>
MetadataReader\PEModule.cs (1)
694internal sealed class TypesByNamespaceSortComparer : IComparer<IGrouping<string, TypeDefinitionHandle>>
Syntax\SyntaxNodeLocationComparer.cs (1)
9internal class SyntaxNodeLocationComparer : IComparer<SyntaxNode>
Microsoft.CodeAnalysis.Analyzers (5)
MetaAnalyzers\ReleaseTrackingHelper.cs (1)
420private sealed class ReverseComparer : IComparer<Version>
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
34: IComparer<(TExpressionSyntax syntax, ITypeSymbol symbol)>
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
137private sealed class SortSystemFirstComparer : IComparer<string>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Microsoft.CodeAnalysis.CSharp (9)
Binder\Binder_Symbols.cs (1)
1925private class ConsistentSymbolOrder : IComparer<Symbol>
Compilation\LexicalOrderSymbolComparer.cs (1)
18internal class LexicalOrderSymbolComparer : IComparer<Symbol>
Declarations\DeclarationTable.cs (1)
141private sealed class RootNamespaceLocationComparer : IComparer<SingleNamespaceDeclaration>
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
704private sealed class CasesComparer : IComparer<(ConstantValue value, LabelSymbol label)>
Symbols\AnonymousTypes\AnonymousTypeManager.Templates.cs (2)
662private class SynthesizedDelegateSymbolComparer : IComparer<AnonymousDelegateTemplateSymbol> 796private sealed class AnonymousTypeOrDelegateComparer : IComparer<AnonymousTypeOrDelegateTemplateSymbol>
Symbols\Metadata\PE\PENamedTypeSymbol.cs (1)
1371private class DeclarationOrderTypeSymbolComparer : IComparer<Symbol>
Symbols\Source\SourceAssemblySymbol.cs (1)
1122private class NameCollisionForAddedModulesTypeComparer : IComparer<NamedTypeSymbol>
Syntax\NullableContextStateMap.cs (1)
177private sealed class PositionComparer : IComparer<NullableContextState>
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (1)
10internal sealed class NameSyntaxComparer : IComparer<NameSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (1)
10internal sealed class TokenComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (1)
11: IComparer<TypeSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (1)
11internal sealed class UsingsAndExternAliasesDirectiveComparer : IComparer<SyntaxNode?>
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
13internal sealed class CSharpDeclarationComparer : IComparer<SyntaxNode>
Microsoft.CodeAnalysis.CSharp.Features (2)
Organizing\Organizers\MemberDeclarationsOrganizer.Comparer.cs (1)
19private sealed class Comparer : IComparer<MemberDeclarationSyntax>
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (1)
16private sealed class Comparer : IComparer<SyntaxToken>
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SymbolUtilities.cs (1)
17: IComparer<NamedTypeSymbol>
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (1)
10internal sealed class NameSyntaxComparer : IComparer<NameSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (1)
10internal sealed class TokenComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (1)
11: IComparer<TypeSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (1)
11internal sealed class UsingsAndExternAliasesDirectiveComparer : IComparer<SyntaxNode?>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
13internal sealed class CSharpDeclarationComparer : IComparer<SyntaxNode>
Microsoft.CodeAnalysis.EditorFeatures (2)
IntelliSense\AsyncCompletion\ItemManager.cs (1)
176private sealed class VSItemComparer : IComparer<VSCompletionItem>
ReferenceHighlighting\NagivateToHighlightReferenceCommandHandler.StartComparer.cs (1)
12private sealed class StartComparer : IComparer<SnapshotSpan>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (1)
71private class EnumFieldComparer : IComparer<EnumField>
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
258private sealed class MemberNameComparer : IComparer<MemberAndDeclarationInfo>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (1)
71private class EnumFieldComparer : IComparer<EnumField>
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
258private sealed class MemberNameComparer : IComparer<MemberAndDeclarationInfo>
Microsoft.CodeAnalysis.Features (5)
CodeFixes\Service\CodeFixService.cs (1)
1005private sealed class FixerComparer : IComparer<CodeFixProvider>
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
898private sealed class SyntaxNodeSpanStartComparer : IComparer<SyntaxNode>
Completion\MatchResult.cs (1)
49private sealed class Comparer : IComparer<MatchResult>
src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
34: IComparer<(TExpressionSyntax syntax, ITypeSymbol symbol)>
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (1)
137private sealed class SortSystemFirstComparer : IComparer<string>
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\UnifiedSuggestions\UnifiedSuggestedActionSetComparer.cs (1)
13internal sealed class UnifiedSuggestedActionSetComparer : IComparer<UnifiedSuggestedActionSet>
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
363private sealed class ClassifiedSpanComparer : IComparer<ClassifiedSpan>
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
DeclarePublicApiFix.cs (1)
400private sealed class IgnoreCaseWhenPossibleComparer : IComparer<string>
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticDescription.cs (1)
638private class LinePositionComparer : IComparer<LinePosition?>
Microsoft.CodeAnalysis.UnitTests (6)
Collections\HashSet\TestingTypes.cs (6)
85public class Comparer_SameAsDefaultComparer : IEqualityComparer<int>, IComparer<int> 104public class Comparer_HashCodeAlwaysReturnsZero : IEqualityComparer<int>, IComparer<int> 123public class Comparer_ModOfInt : IEqualityComparer<int>, IComparer<int> 154public class Comparer_AbsOfInt : IEqualityComparer<int>, IComparer<int> 225public class WrapStructural_Int : IEqualityComparer<int>, IComparer<int> 244public class WrapStructural_SimpleInt : IEqualityComparer<SimpleInt>, IComparer<SimpleInt>
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (1)
308Implements IComparer(Of AnonymousTypeOrDelegateTemplateSymbol)
Microsoft.CodeAnalysis.Workspaces (5)
Shared\Extensions\IComparerExtensions.cs (1)
22private sealed class InverseComparer<T> : IComparer<T>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Workspace\Solution\TextDocumentStates.cs (1)
287private sealed class DocumentIdComparer : IComparer<DocumentId?>
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (1)
71private class EnumFieldComparer : IComparer<EnumField>
Microsoft.DotNet.XUnitAssert.Tests (1)
RangeAssertsTests.cs (1)
202 class DoubleComparer : IComparer<double>
Microsoft.Extensions.Configuration (1)
ConfigurationKeyComparer.cs (1)
12public class ConfigurationKeyComparer : IComparer<string>
Microsoft.Extensions.Primitives (1)
StringSegmentComparer.cs (1)
12public class StringSegmentComparer : IComparer<StringSegment>, IEqualityComparer<StringSegment>
Microsoft.Maui.Controls (2)
Menu\MenuBarTracker.cs (1)
66 class MenuBarItemComparer : IComparer<MenuBarItem>
Toolbar\ToolbarTracker.cs (1)
20 class ToolBarItemComparer : IComparer<ToolbarItem>
Microsoft.Maui.Graphics (1)
Text\AttributedTextRunComparer.cs (1)
5 public class AttributedTextRunComparer : IComparer<IAttributedTextRun>
Microsoft.ML.Ensemble (2)
Selector\SubModelSelector\BaseBestPerformanceSelector.cs (1)
69private sealed class ModelPerformanceComparer : IComparer<FeatureSubsetModel<TOutput>>
Selector\SubModelSelector\BaseDiverseSelector.cs (1)
118public class ModelDiversityComparer : IComparer<ModelDiversityMetric<TOutput>>
Microsoft.ML.FastTree (2)
Training\DcgPermutationComparer.cs (2)
10internal abstract class DcgPermutationComparer : IComparer<int> 128internal class DescendingStableIdealComparer : IComparer<int>
Microsoft.ML.Sweeper (2)
Algorithms\KdoSweeper.cs (1)
498private sealed class FloatArrayComparer : IComparer<float[]>
Algorithms\NelderMead.cs (1)
458private sealed class SimplexVertexComparer : IComparer<IRunResult>
Microsoft.ML.TimeSeries (1)
PolynomialUtils.cs (1)
255private sealed class ByMaximumCoefficient : IComparer<PolynomialFactor>
Microsoft.ML.Tokenizers (1)
Utils\OrdinalUtf8StringComparer.cs (1)
16internal class OrdinalUtf8StringComparer : IComparer<string>
Microsoft.ML.Tokenizers.Tests (1)
src\Microsoft.ML.Tokenizers\Utils\OrdinalUtf8StringComparer.cs (1)
16internal class OrdinalUtf8StringComparer : IComparer<string>
Microsoft.Net.Http.Headers (2)
MediaTypeHeaderValueComparer.cs (1)
10public class MediaTypeHeaderValueComparer : IComparer<MediaTypeHeaderValue>
StringWithQualityHeaderValueComparer.cs (1)
15public class StringWithQualityHeaderValueComparer : IComparer<StringWithQualityHeaderValue>
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
751Private NotInheritable Class InheritanceSorter : Implements IComparer(Of MemberInfo)
Microsoft.VisualStudio.LanguageServices (4)
DocumentOutline\DocumentSymbolDataViewModelSorter.cs (3)
48private sealed class NameComparer : IComparer<DocumentSymbolDataViewModel> 56private sealed class LocationComparer : IComparer<DocumentSymbolDataViewModel> 64private sealed class TypeComparer : IComparer<DocumentSymbolDataViewModel>
Shared\LogicalStringComparer.cs (1)
10internal sealed class LogicalStringComparer : IComparer<string>
PresentationCore (3)
MS\Internal\FontCache\FontCacheUtil.cs (2)
923private class NameComparerClass : IComparer<LocalizedName> 935private class LanguageComparerClass : IComparer<LocalizedName>
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
235private class MatchingFaceComparer : IComparer<MatchingFace>
PresentationFramework (7)
MS\Internal\Annotations\TextAnchor.cs (1)
763private class TextSegmentComparer : IComparer<TextSegment>
System\Windows\Controls\Grid.cs (6)
3723private sealed class StarDistributionOrderIndexComparer : IComparer<int> 3749private sealed class DistributionOrderIndexComparer : IComparer<int> 3777private sealed class RoundingErrorIndexComparer : IComparer<int> 3837private sealed class MinRatioIndexComparer : IComparer<int> 3863private sealed class MaxRatioIndexComparer : IComparer<int> 3889private sealed class StarWeightIndexComparer : IComparer<int>
ReachFramework (1)
Packaging\XpsInterleavingPolicy.cs (1)
562internal class NodeComparer : IComparer<InterleavingNode>
Roslyn.Diagnostics.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (1)
10internal sealed class NameSyntaxComparer : IComparer<NameSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (1)
10internal sealed class TokenComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (1)
11: IComparer<TypeSyntax?>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (1)
11internal sealed class UsingsAndExternAliasesDirectiveComparer : IComparer<SyntaxNode?>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (1)
13internal sealed class CSharpDeclarationComparer : IComparer<SyntaxNode>
System.ComponentModel.TypeConverter (2)
System\ComponentModel\ReferenceConverter.cs (1)
191private readonly struct ReferenceComparer : IComparer<object>
System\Drawing\ColorConverter.cs (1)
147private sealed class ColorComparer : IComparer<Color>
System.Configuration.ConfigurationManager (1)
System\Configuration\BaseConfigurationRecord.cs (1)
3740private sealed class IndirectLocationInputComparer : IComparer<SectionInput>
System.Data.Common (1)
System\Data\SortExpressionBuilder.cs (1)
15internal sealed class SortExpressionBuilder<T> : IComparer<List<object>>
System.Formats.Asn1 (2)
System\Formats\Asn1\AsnWriter.cs (1)
796private sealed class ArrayIndexSetOfValueComparer : IComparer<(int, int)>
System\Formats\Asn1\SetOfValueComparer.cs (1)
8internal sealed class SetOfValueComparer : IComparer<ReadOnlyMemory<byte>>
System.Formats.Cbor (1)
System\Formats\Cbor\Writer\CborWriter.Map.cs (1)
260private sealed class KeyEncodingComparer : IComparer<KeyValuePairEncodingRange>,
System.Formats.Tar (1)
System\Formats\Tar\TarHelpers.Unix.cs (1)
40private sealed class ReverseStringComparer : IComparer<string>
System.Linq.AsyncEnumerable (2)
System\Linq\OrderBy.cs (2)
271private abstract class EnumerableSorter<TElement> : IComparer<int> 302private sealed class EnumerableSorter<TElement, TKey> : EnumerableSorter<TElement>, IComparer<int>
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
215private sealed class DebugInfoComparer : IComparer<DebugInfo>
System.Linq.Parallel (5)
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (2)
189private sealed class ProducerComparer : IComparer<Producer<TKey>> 527internal sealed class ProducerComparerInt : IComparer<Producer<int>>
System\Linq\Parallel\QueryOperators\Binary\ConcatQueryOperator.cs (1)
332private sealed class ConcatKeyComparer : IComparer<ConcatKey<TLeftKey, TRightKey>>
System\Linq\Parallel\Utils\PairComparer.cs (1)
20internal sealed class PairComparer<T, U> : IComparer<Pair<T, U>>
System\Linq\Parallel\Utils\ReverseComparer.cs (1)
20internal sealed class ReverseComparer<T> : IComparer<T>
System.Private.CoreLib (5)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Comparer.cs (1)
12public abstract partial class Comparer<T> : IComparer, IComparer<T>
src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (1)
15public readonly struct TotalOrderIeee754Comparer<T> : IComparer<T>, IEqualityComparer<T>, IEquatable<TotalOrderIeee754Comparer<T>>
src\libraries\System.Private.CoreLib\src\System\Resources\FastResourceComparer.cs (1)
14internal sealed class FastResourceComparer : IComparer, IEqualityComparer, IComparer<string?>, IEqualityComparer<string?>
src\libraries\System.Private.CoreLib\src\System\StringComparer.cs (1)
15public abstract class StringComparer : IComparer, IEqualityComparer, IComparer<string?>, IEqualityComparer<string?>
src\System\Collections\Generic\Comparer.CoreCLR.cs (1)
8public abstract partial class Comparer<T> : IComparer, IComparer<T>
System.Private.DataContractSerialization (2)
System\Runtime\Serialization\ClassDataContract.cs (2)
1293internal sealed class DataMemberConflictComparer : IComparer<Member> 1478internal sealed class DataMemberComparer : IComparer<DataMember>
System.Private.Xml (7)
System\Xml\Core\XmlTextReaderImplHelpers.cs (1)
714private sealed class DtdDefaultAttributeInfoToNodeDataComparer : IComparer<object>
System\Xml\Serialization\Mappings.cs (2)
748internal sealed class AccessorComparer : IComparer<ElementAccessor> 863internal sealed class MemberMappingComparer : IComparer<MemberMapping>
System\Xml\XPath\Internal\SortQuery.cs (1)
142internal sealed class XPathSortComparer : IComparer<SortKey>
System\Xml\Xsl\Runtime\DocumentOrderComparer.cs (1)
18internal sealed class DocumentOrderComparer : IComparer<XPathNavigator>
System\Xml\Xsl\Xslt\Compiler.cs (1)
358private sealed class CompilerErrorComparer : IComparer<CompilerError>
System\Xml\Xsl\Xslt\MatcherBuilder.cs (1)
225internal sealed class TemplateMatchComparer : IComparer<TemplateMatch>
System.Private.Xml.Linq (1)
System\Xml\Linq\XNodeDocumentOrderComparer.cs (1)
16IComparer<XNode?>
System.Reflection.Metadata (3)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
580private sealed class SuffixSort : IComparer<KeyValuePair<string, StringHandle>>
System\Reflection\Metadata\HandleComparer.cs (2)
8public sealed class HandleComparer : IEqualityComparer<Handle>, IComparer<Handle>, IEqualityComparer<EntityHandle>, IComparer<EntityHandle>
System.Resources.Extensions (1)
src\libraries\System.Private.CoreLib\src\System\Resources\FastResourceComparer.cs (1)
14internal sealed class FastResourceComparer : IComparer, IEqualityComparer, IComparer<string?>, IEqualityComparer<string?>
System.Resources.Writer (1)
System\Resources\__FastResourceComparer.cs (1)
13internal sealed class FastResourceComparer : IComparer<string>, IEqualityComparer<string>
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\Primitives\StarLayoutInfo.cs (2)
158private class PerStarComparerImpl : IComparer<StarLayoutInfo> 171private class PotentialPerStarComparerImpl : IComparer<StarLayoutInfo>
System.Windows.Forms (14)
System\Windows\Forms\Control.ControlTabOrderComparer.cs (1)
11private class ControlTabOrderComparer : IComparer<ControlTabOrderHolder>
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
14public partial class ObjectCollection : IList, IComparer<Entry>
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.ColumnOrderComparer.cs (1)
8private class ColumnOrderComparer : IComparer<DataGridViewColumn?>
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ItemComparer.cs (1)
10private sealed class ItemComparer : IComparer<object?>
System\Windows\Forms\Controls\Labels\LinkLabel.LinkComparer.cs (1)
8private class LinkComparer : IComparer<Link>
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\AttributeTypeSorter.cs (1)
10internal class AttributeTypeSorter : IComparer, IComparer<Attribute>
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntryComparer.cs (1)
6internal class GridEntryComparer : IComparer<GridEntry>
System\Windows\Forms\Controls\ToolStrips\ToolStripCustomIComparer.cs (1)
6internal class ToolStripCustomIComparer : IComparer<ToolStrip>
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.XYComparer.cs (1)
13public class XYComparer : IComparer<IArrangedElement>
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelControlCollection.YXComparer.cs (1)
13public class YXComparer : IComparer<IArrangedElement>
System\Windows\Forms\Internal\ItemArray.cs (1)
22internal partial class ItemArray : IComparer<Entry>
System\Windows\Forms\Layout\TableLayout.PostAssignedPositionComparer.cs (1)
8private class PostAssignedPositionComparer : IComparer<LayoutInfo>
System\Windows\Forms\Layout\TableLayout.PreAssignedPositionComparer.cs (1)
8private class PreAssignedPositionComparer : IComparer<LayoutInfo>
System\Windows\Forms\Layout\TableLayout.SpanComparer.cs (1)
8private abstract class SpanComparer : IComparer<LayoutInfo>
System.Windows.Forms.Design (9)
System\ComponentModel\Design\Serialization\TypeCodeDomSerializer.StatementOrderComparer.cs (1)
8private class StatementOrderComparer : IComparer<OrderedCodeStatementCollection>
System\Drawing\Design\ColorEditor.StandardColorComparer.cs (1)
11private class StandardColorComparer : IComparer<Color>
System\Drawing\Design\ColorEditor.SystemColorComparer.cs (1)
13private class SystemColorComparer : IComparer<Color>
System\Windows\Forms\Design\CommandSet.cs (4)
3463private class ComponentLeftCompare : IComparer<IComponent> 3481private class ComponentTopCompare : IComparer<IComponent> 3496private class ControlZOrderCompare : IComparer<IComponent> 3522private class TabIndexComparer : IComparer<Control>
System\Windows\Forms\Design\ComponentTray.cs (1)
2769internal class AutoArrangeComparer : IComparer<Control>
System\Windows\Forms\Design\MaskDescriptorComparer.cs (1)
10internal class MaskDescriptorComparer : IComparer<MaskDescriptor>
System.Xaml (2)
System\Xaml\XamlObjectReader.cs (2)
2185private class PropertySorterForXmlSyntax : IComparer<MarkupInfo> 2261private class PropertySorterForCurlySyntax : IComparer<MarkupInfo>
Test.Utilities (3)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
Text.Analyzers (4)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
17internal sealed class SymbolByDisplayStringComparer : IComparer<ITypeSymbol>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
554private sealed class TokenOrderComparer : IComparer<SyntaxToken>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\EditorConfig\EditorConfigNamingStyleParser.cs (1)
125private abstract class NamingRuleSubsetComparer : IComparer<NamingRule>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
13internal abstract class AbstractFlagsEnumGenerator : IComparer<(IFieldSymbol field, ulong value)>
xunit.assert (1)
Sdk\AssertRangeComparer.cs (1)
25 sealed class AssertRangeComparer<T> : IComparer<T>
1919 references to IComparer
dotnet-svcutil-lib (4)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlTextReaderImplHelpers.cs (2)
721private static IComparer<object> s_instance = new DtdDefaultAttributeInfoToNodeDataComparer(); 723internal static IComparer<object> Instance
FrameworkFork\Microsoft.Xml\Xml\XPath\Internal\SortQuery.cs (1)
204int IComparer<SortKey>.Compare(SortKey x, SortKey y)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\ClassDataContract.cs (1)
1124IComparer<Member> comparer = DataMemberConflictComparer.Singleton;
GenerateDocumentationAndConfigFiles (75)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Microsoft.CodeAnalysis.Analyzers\Core\MetaAnalyzers\ReleaseTrackingHelper.cs (1)
422public static readonly IComparer<Version> Instance = new ReverseComparer();
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Metrics (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Metrics.Legacy (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Microsoft.AspNetCore.Components (1)
Routing\RouteTableFactory.cs (1)
26public static readonly IComparer<InboundRouteEntry> RouteOrder = Comparer<InboundRouteEntry>.Create((x, y) =>
Microsoft.AspNetCore.Routing (16)
Matching\AcceptsMatcherPolicy.cs (1)
20public IComparer<Endpoint> Comparer { get; } = new ConsumesMetadataEndpointComparer();
Matching\CandidateSet.cs (1)
208public void ExpandEndpoint(int index, IReadOnlyList<Endpoint> endpoints, IComparer<Endpoint> comparer)
Matching\EndpointComparer.cs (4)
25private readonly IComparer<Endpoint>[] _comparers; 30_comparers = new IComparer<Endpoint>[2 + policies.Length]; 108public static readonly IComparer<Endpoint> Instance = new OrderComparer(); 135public static readonly IComparer<Endpoint> Instance = new PrecedenceComparer();
Matching\EndpointMetadataComparer.cs (5)
15/// provider and provided to <see cref="CandidateSet.ExpandEndpoint(int, IReadOnlyList{Endpoint}, IComparer{Endpoint})"/>. 20private IComparer<Endpoint>[]? _comparers; 31private IComparer<Endpoint>[] Comparers 48int IComparer<Endpoint>.Compare(Endpoint? x, Endpoint? y) 68/// A base class for <see cref="IComparer{Endpoint}"/> implementations that use
Matching\HostMatcherPolicy.cs (1)
24public IComparer<Endpoint> Comparer { get; } = new HostMetadataEndpointComparer();
Matching\HttpMethodMatcherPolicy.cs (1)
30public IComparer<Endpoint> Comparer => new HttpMethodMetadataEndpointComparer();
Matching\IEndpointComparerPolicy.cs (2)
30/// Gets an <see cref="IComparer{Endpoint}"/> that will be used to sort the endpoints. 32IComparer<Endpoint> Comparer { get; }
Matching\NegotiationMatcherPolicy.cs (1)
21public IComparer<Endpoint> Comparer => new NegotiationMetadataEndpointComparer();
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
Matching\MatcherBuilderMultipleEntryBenchmark.cs (2)
109public IComparer<Endpoint> Comparer => new TestEndpointComparer(); 155public IComparer<Endpoint> Comparer => new TestEndpointComparer();
Microsoft.AspNetCore.Routing.Tests (6)
Matching\CandidateSetTest.cs (1)
399public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata>.Default;
Matching\DfaMatcherBuilderTest.cs (3)
3587public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata1>.Default; 3629public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata2>.Default; 3657public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata1>.Default;
Matching\EndpointComparerTest.cs (2)
263public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata1>.Default; 272public IComparer<Endpoint> Comparer => EndpointMetadataComparer<TestMetadata2>.Default;
Microsoft.Cci.Extensions (7)
Comparers\CciComparers.cs (6)
60public virtual IComparer<T> GetComparer<T>() 63return (IComparer<T>)_assemblyComparer; 66return (IComparer<T>)_namespaceComparer; 69return (IComparer<T>)_typeComparer; 72return (IComparer<T>)_memberComparer; 75return (IComparer<T>)_attributeComparer;
Comparers\ICciComparers.cs (1)
11IComparer<T> GetComparer<T>();
Microsoft.CodeAnalysis (62)
InternalUtilities\EnumField.cs (2)
15public static readonly IComparer<EnumField> Comparer = new EnumFieldComparer(); 73int IComparer<EnumField>.Compare(EnumField field1, EnumField field2)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.Analyzers (75)
MetaAnalyzers\ReleaseTrackingHelper.cs (1)
422public static readonly IComparer<Version> Instance = new ReverseComparer();
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Microsoft.CodeAnalysis.AnalyzerUtilities (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Microsoft.CodeAnalysis.BannedApiAnalyzers (74)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Microsoft.CodeAnalysis.CodeStyle (60)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.CodeStyle.Fixes (10)
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (2)
96var comparer = i == 0 && sortSystemFirst ? SortSystemFirstComparer.Instance : StringComparer.Ordinal; 139public static readonly IComparer<string> Instance = new SortSystemFirstComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Microsoft.CodeAnalysis.Collections.Package (60)
Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.CSharp (2)
Compiler\DocumentationCommentCompiler.cs (1)
1251private IComparer<CSharpSyntaxNode> Comparer
Lowering\LocalRewriter\LocalRewriter.DecisionDagRewriter.cs (1)
713int IComparer<(ConstantValue value, LabelSymbol label)>.Compare((ConstantValue value, LabelSymbol label) left, (ConstantValue value, LabelSymbol label) right)
Microsoft.CodeAnalysis.CSharp.CodeStyle (18)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (5)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal NameSyntaxComparer(IComparer<SyntaxToken> tokenComparer) 21public static IComparer<NameSyntax?> Create() 24public static IComparer<NameSyntax?> Create(IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
12public static readonly IComparer<SyntaxToken> NormalInstance = new TokenComparer(specialCaseSystem: false); 13public static readonly IComparer<SyntaxToken> SystemFirstInstance = new TokenComparer(specialCaseSystem: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (4)
10internal sealed class TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<NameSyntax?> nameComparer) 13private readonly IComparer<SyntaxToken> _tokenComparer = tokenComparer; 14internal readonly IComparer<NameSyntax?> NameComparer = nameComparer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (6)
13public static readonly IComparer<SyntaxNode> NormalInstance = new UsingsAndExternAliasesDirectiveComparer( 17public static readonly IComparer<SyntaxNode> SystemFirstInstance = new UsingsAndExternAliasesDirectiveComparer( 21private readonly IComparer<NameSyntax> _nameComparer; 22private readonly IComparer<SyntaxToken> _tokenComparer; 25IComparer<NameSyntax> nameComparer, 26IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
127var comparer = placeSystemNamespaceFirst
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
43protected override IComparer<SyntaxNode> GetMemberComparer()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\UsingDirectiveSyntaxExtensions.cs (2)
19var systemFirstInstance = UsingsAndExternAliasesDirectiveComparer.SystemFirstInstance; 20var normalInstance = UsingsAndExternAliasesDirectiveComparer.NormalInstance;
Microsoft.CodeAnalysis.CSharp.Workspaces (21)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (5)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal NameSyntaxComparer(IComparer<SyntaxToken> tokenComparer) 21public static IComparer<NameSyntax?> Create() 24public static IComparer<NameSyntax?> Create(IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
12public static readonly IComparer<SyntaxToken> NormalInstance = new TokenComparer(specialCaseSystem: false); 13public static readonly IComparer<SyntaxToken> SystemFirstInstance = new TokenComparer(specialCaseSystem: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (4)
10internal sealed class TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<NameSyntax?> nameComparer) 13private readonly IComparer<SyntaxToken> _tokenComparer = tokenComparer; 14internal readonly IComparer<NameSyntax?> NameComparer = nameComparer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (6)
13public static readonly IComparer<SyntaxNode> NormalInstance = new UsingsAndExternAliasesDirectiveComparer( 17public static readonly IComparer<SyntaxNode> SystemFirstInstance = new UsingsAndExternAliasesDirectiveComparer( 21private readonly IComparer<NameSyntax> _nameComparer; 22private readonly IComparer<SyntaxToken> _tokenComparer; 25IComparer<NameSyntax> nameComparer, 26IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
127var comparer = placeSystemNamespaceFirst
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
43protected override IComparer<SyntaxNode> GetMemberComparer()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\UsingDirectiveSyntaxExtensions.cs (2)
19var systemFirstInstance = UsingsAndExternAliasesDirectiveComparer.SystemFirstInstance; 20var normalInstance = UsingsAndExternAliasesDirectiveComparer.NormalInstance;
Microsoft.CodeAnalysis.Debugging.Package (3)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (2)
15public static readonly IComparer<EnumField> Comparer = new EnumFieldComparer(); 73int IComparer<EnumField>.Compare(EnumField field1, EnumField field2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\ArrayBuilder.cs (1)
120public void Sort(IComparer<T> comparer)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
59public static readonly IComparer<MemberAndDeclarationInfo> Comparer = new MemberNameComparer();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (4)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (2)
15public static readonly IComparer<EnumField> Comparer = new EnumFieldComparer(); 73int IComparer<EnumField>.Compare(EnumField field1, EnumField field2)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\ArrayBuilder.cs (1)
120public void Sort(IComparer<T> comparer)
src\ExpressionEvaluator\Core\Source\ResultProvider\Helpers\MemberAndDeclarationInfo.cs (1)
59public static readonly IComparer<MemberAndDeclarationInfo> Comparer = new MemberNameComparer();
Microsoft.CodeAnalysis.Extensions.Package (60)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.Features (4)
Completion\MatchResult.cs (1)
47public static IComparer<MatchResult> SortingComparer { get; } = new Comparer();
src\Analyzers\Core\CodeFixes\AliasAmbiguousType\AbstractAliasAmbiguousTypeCodeFixProvider.cs (2)
96var comparer = i == 0 && sortSystemFirst ? SortSystemFirstComparer.Instance : StringComparer.Ordinal; 139public static readonly IComparer<string> Instance = new SortSystemFirstComparer();
Structure\Syntax\AbstractBlockStructureProvider.cs (1)
19private static readonly IComparer<BlockSpan> s_blockSpanComparer = Comparer<BlockSpan>.Create(static (x, y) => y.TextSpan.Start.CompareTo(x.TextSpan.Start));
Microsoft.CodeAnalysis.InteractiveHost (60)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (74)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Microsoft.CodeAnalysis.PooledObjects.Package (3)
ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.PublicApiAnalyzers (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Microsoft.CodeAnalysis.ResxSourceGenerator (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Microsoft.CodeAnalysis.Threading.Package (60)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.CodeAnalysis.UnitTests (28)
Collections\HashSet\SegmentedHashSet_Generic_Tests.cs (3)
47protected override IComparer<int> GetIComparer() 71protected override IComparer<SimpleInt> GetIComparer() 147protected override IComparer<int> GetIComparer()
Collections\ImmutableListTestBase.cs (5)
66private protected abstract int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, T item, IComparer<T>? comparer); 68private protected abstract int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, int index, int count, T item, IComparer<T>? comparer); 422IComparer<int>? comparer = null; 535private protected abstract List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, IComparer<T>? comparer); 537private protected abstract List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, int index, int count, IComparer<T>? comparer);
Collections\ImmutableSegmentedListBuilderTest.cs (4)
512private protected override int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, T item, IComparer<T>? comparer) 515private protected override int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, int index, int count, T item, IComparer<T>? comparer) 532private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, IComparer<T>? comparer) 539private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, int index, int count, IComparer<T>? comparer)
Collections\ImmutableSegmentedListTest.cs (4)
866private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, IComparer<T>? comparer) 871private protected override List<T> SortTestHelper<T>(ImmutableSegmentedList<T> list, int index, int count, IComparer<T>? comparer) 937private protected override int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, T item, IComparer<T>? comparer) 940private protected override int BinarySearchImpl<T>(ImmutableSegmentedList<T> list, int index, int count, T item, IComparer<T>? comparer)
Collections\ImmutableSetTest.cs (1)
436protected static void EnumeratorTestHelper<T>(System.Collections.Immutable.IImmutableSet<T> emptySet, IComparer<T>? comparer, params T[] values)
Collections\ImmutableSetTest.nonnetstandard.cs (2)
39IComparer<double>? comparer = GetComparer(set); 61protected static IComparer<T>? GetComparer<T>(System.Collections.Immutable.IImmutableSet<T> set)
Collections\List\SegmentedList.Generic.Tests.Sort.cs (8)
37IComparer<T> comparer = Comparer<T>.Default; 51IComparer<T> comparer = Comparer<T>.Default; 68IComparer<T> comparer = GetIComparer(); 82IComparer<T> comparer = GetIComparer(); 99IComparer<T> iComparer = GetIComparer(); 114IComparer<T> iComparer = GetIComparer(); 132IComparer<T> comparer = GetIComparer(); 148IComparer<T> comparer = GetIComparer();
Collections\List\TestBase.Generic.cs (1)
44protected virtual IComparer<T> GetIComparer() => Comparer<T>.Default;
Microsoft.CodeAnalysis.VisualBasic (1)
Symbols\AnonymousTypes\AnonymousTypeManager_Templates.vb (1)
316Public Function Compare(x As AnonymousTypeOrDelegateTemplateSymbol, y As AnonymousTypeOrDelegateTemplateSymbol) As Integer Implements IComparer(Of AnonymousTypeOrDelegateTemplateSymbol).Compare
Microsoft.CodeAnalysis.Workspaces (73)
Shared\Extensions\IComparerExtensions.cs (4)
12public static IComparer<T> Inverse<T>(this IComparer<T> comparer) 24private readonly IComparer<T> _comparer; 26internal InverseComparer(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Workspace\Solution\TextDocumentStates.cs (1)
289public static readonly IComparer<DocumentId?> Instance = new DocumentIdComparer();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (62)
src\Compilers\Core\Portable\InternalUtilities\EnumField.cs (2)
15public static readonly IComparer<EnumField> Comparer = new EnumFieldComparer(); 73int IComparer<EnumField>.Compare(EnumField field1, EnumField field2)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
Microsoft.Data.Analysis (8)
DataFrameColumn.cs (8)
542IComparer<T> comparer) 552IComparer<T> comparer) 600where TComparer : IComparer<TKey> 658where TComparer : IComparer<TKey> 680where TComparer : IComparer<TKey> 713where TComparer : IComparer<TKey> 741where TComparer : IComparer<TKey> 751IComparer<TKey> comparer)
Microsoft.DotNet.XliffTasks (2)
EnumerableExtensions.cs (1)
11public static bool IsSorted<T, U>(this IEnumerable<T> source, Func<T, U> keySelector, IComparer<U> comparer)
Model\XlfDocument.cs (1)
231IComparer<string> comparer = StringComparer.Ordinal;
Microsoft.DotNet.XUnitAssert.Tests (1)
SetExtensions.cs (1)
5 public static SortedSet<T> ToSortedSet<T>(this ISet<T> set, IComparer<T>? comparer = null) =>
Microsoft.Maui.Controls (3)
Menu\MenuBarTracker.cs (1)
63 protected override IComparer<MenuBarItem> CreateComparer() =>
Menu\MenuItemTracker.cs (1)
23 protected abstract IComparer<TMenuItem> CreateComparer();
Toolbar\ToolbarTracker.cs (1)
17 protected override IComparer<ToolbarItem> CreateComparer() =>
Microsoft.ML.FastTree (1)
Training\DcgPermutationComparer.cs (1)
160int IComparer<int>.Compare(int x, int y)
Microsoft.Net.Http.Headers (2)
MediaTypeHeaderValueComparer.cs (1)
7/// Implementation of <see cref="IComparer{T}"/> that can compare accept media type header fields
StringWithQualityHeaderValueComparer.cs (1)
9/// Implementation of <see cref="IComparer{T}"/> that can compare content negotiation header fields
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\Symbols.vb (1)
756Private Function Compare(ByVal left As MemberInfo, ByVal right As MemberInfo) As Integer Implements IComparer(Of MemberInfo).Compare
Microsoft.VisualStudio.LanguageServices (2)
DocumentOutline\DocumentSymbolDataViewModelSorter.cs (1)
33public static IComparer<DocumentSymbolDataViewModel> GetComparer(SortOption sortOption)
Shared\LogicalStringComparer.cs (1)
15public static readonly IComparer<string> Instance = new LogicalStringComparer();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
91[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IComparer<>))]
netstandard (1)
netstandard.cs (1)
113[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IComparer<>))]
PresentationCore (7)
MS\Internal\FontCache\FontCacheUtil.cs (4)
907internal static IComparer<LocalizedName> NameComparer 915internal static IComparer<LocalizedName> LanguageComparer 927int IComparer<LocalizedName>.Compare(LocalizedName x, LocalizedName y) 939int IComparer<LocalizedName>.Compare(LocalizedName x, LocalizedName y)
MS\Internal\FontFace\PhysicalFontFamily.cs (1)
242int IComparer<MatchingFace>.Compare(MatchingFace a, MatchingFace b)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\LegacyPriorityQueue.cs (2)
102internal LegacyPriorityQueue(int capacity, IComparer<T> comparer) 252private IComparer<T> _comparer;
PresentationFramework (1)
System\Windows\Documents\Speller.cs (1)
2027private readonly IComparer<string> _defaultComparer;
ReachFramework (1)
Packaging\XpsInterleavingPolicy.cs (1)
579IComparer<InterleavingNode>.Compare(
Roslyn.Diagnostics.Analyzers (74)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
Roslyn.Diagnostics.CSharp.Analyzers (21)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (5)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal NameSyntaxComparer(IComparer<SyntaxToken> tokenComparer) 21public static IComparer<NameSyntax?> Create() 24public static IComparer<NameSyntax?> Create(IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
12public static readonly IComparer<SyntaxToken> NormalInstance = new TokenComparer(specialCaseSystem: false); 13public static readonly IComparer<SyntaxToken> SystemFirstInstance = new TokenComparer(specialCaseSystem: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (4)
10internal sealed class TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<NameSyntax?> nameComparer) 13private readonly IComparer<SyntaxToken> _tokenComparer = tokenComparer; 14internal readonly IComparer<NameSyntax?> NameComparer = nameComparer;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (6)
13public static readonly IComparer<SyntaxNode> NormalInstance = new UsingsAndExternAliasesDirectiveComparer( 17public static readonly IComparer<SyntaxNode> SystemFirstInstance = new UsingsAndExternAliasesDirectiveComparer( 21private readonly IComparer<NameSyntax> _nameComparer; 22private readonly IComparer<SyntaxToken> _tokenComparer; 25IComparer<NameSyntax> nameComparer, 26IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesOrganizer.cs (1)
127var comparer = placeSystemNamespaceFirst
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
43protected override IComparer<SyntaxNode> GetMemberComparer()
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\UsingDirectiveSyntaxExtensions.cs (2)
19var systemFirstInstance = UsingsAndExternAliasesDirectiveComparer.SystemFirstInstance; 20var normalInstance = UsingsAndExternAliasesDirectiveComparer.NormalInstance;
System.Collections (32)
System\Collections\Generic\PriorityQueue.cs (9)
31private readonly IComparer<TPriority>? _comparer; 96public PriorityQueue(IComparer<TPriority>? comparer) 114public PriorityQueue(int initialCapacity, IComparer<TPriority>? comparer) 156public PriorityQueue(IEnumerable<(TElement Element, TPriority Priority)> items, IComparer<TPriority>? comparer) 182public IComparer<TPriority> Comparer => _comparer ?? Comparer<TPriority>.Default; 761IComparer<TPriority> comparer = _comparer; 843IComparer<TPriority> comparer = _comparer; 917private static IComparer<TPriority>? InitializeComparer(IComparer<TPriority>? comparer)
System\Collections\Generic\SortedDictionary.cs (8)
23public SortedDictionary() : this((IComparer<TKey>?)null) 31public SortedDictionary(IDictionary<TKey, TValue> dictionary, IComparer<TKey>? comparer) 54public SortedDictionary(IComparer<TKey>? comparer) 145public IComparer<TKey> Comparer 838internal IComparer<TKey> keyComparer; // Do not rename (binary serialization) 840public KeyValuePairComparer(IComparer<TKey>? keyComparer) 884public TreeSet(IComparer<T>? comparer) : base(comparer) { } 886internal TreeSet(TreeSet<T> set, IComparer<T>? comparer) : base(set, comparer) { }
System\Collections\Generic\SortedList.cs (5)
61private readonly IComparer<TKey> comparer; // Do not rename (binary serialization) 106public SortedList(IComparer<TKey>? comparer) 124public SortedList(int capacity, IComparer<TKey>? comparer) 149public SortedList(IDictionary<TKey, TValue> dictionary, IComparer<TKey>? comparer) 257public IComparer<TKey> Comparer
System\Collections\Generic\SortedSet.cs (8)
54private IComparer<T> comparer = default!; 76public SortedSet(IComparer<T>? comparer) 84public SortedSet(IEnumerable<T> collection, IComparer<T>? comparer) 275public IComparer<T> Comparer => comparer; 792internal static bool SortedSetEquals(SortedSet<T>? set1, SortedSet<T>? set2, IComparer<T> comparer) 1538info.AddValue(ComparerName, comparer, typeof(IComparer<T>)); 1563comparer = (IComparer<T>)siInfo.GetValue(ComparerName, typeof(IComparer<T>))!;
System\Collections\Generic\SortedSetEqualityComparer.cs (2)
13private readonly IComparer<T> _comparer; 24private SortedSetEqualityComparer(IComparer<T>? comparer, IEqualityComparer<T>? memberEqualityComparer)
System.Collections.Immutable (86)
System\Collections\Immutable\ImmutableArray.cs (6)
480/// the specified <see cref="IComparer{T}"/> generic interface. 486/// The <see cref="IComparer{T}"/> implementation to use when comparing 503public static int BinarySearch<T>(this ImmutableArray<T> array, T value, IComparer<T>? comparer) 544/// a value, using the specified <see cref="IComparer{T}"/> generic 553/// The <see cref="IComparer{T}"/> implementation to use when comparing 577public static int BinarySearch<T>(this ImmutableArray<T> array, int index, int length, T value, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableArray_1.Builder.cs (2)
985public void Sort(IComparer<T>? comparer) 999public void Sort(int index, int count, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableArray_1.cs (2)
813public ImmutableArray<T> Sort(IComparer<T>? comparer) 825public ImmutableArray<T> Sort(int index, int count, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableList_1.Builder.cs (6)
893/// The <see cref="IComparer{T}"/> implementation to use when comparing 896public void Sort(IComparer<T>? comparer) 912/// The <see cref="IComparer{T}"/> implementation to use when comparing 915public void Sort(int index, int count, IComparer<T>? comparer) 964public int BinarySearch(T item, IComparer<T>? comparer) 998public int BinarySearch(int index, int count, T item, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableList_1.cs (8)
77/// The <see cref="IComparer{T}"/> implementation to use when comparing 91public int BinarySearch(T item, IComparer<T>? comparer) => this.BinarySearch(0, this.Count, item, comparer); 102/// The <see cref="IComparer{T}"/> implementation to use when comparing 124public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) => _root.BinarySearch(index, count, item, comparer); 450/// The <see cref="IComparer{T}"/> implementation to use when comparing 454public ImmutableList<T> Sort(IComparer<T>? comparer) => this.Wrap(_root.Sort(comparer)); 467/// The <see cref="IComparer{T}"/> implementation to use when comparing 471public ImmutableList<T> Sort(int index, int count, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableList_1.Node.cs (6)
588/// The <see cref="IComparer{T}"/> implementation to use when comparing 592internal Node Sort(IComparer<T>? comparer) => this.Sort(0, this.Count, comparer); 605/// The <see cref="IComparer{T}"/> implementation to use when comparing 609internal Node Sort(int index, int count, IComparer<T>? comparer) 631/// The <see cref="IComparer{T}"/> implementation to use when comparing 651internal int BinarySearch(int index, int count, T item, IComparer<T>? comparer)
System\Collections\Immutable\ImmutableSortedDictionary.cs (10)
33public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull 46public static ImmutableSortedDictionary<TKey, TValue> Create<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 71public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 85public static ImmutableSortedDictionary<TKey, TValue> CreateRange<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer, IEnumerable<KeyValuePair<TKey, TValue>> items) where TKey : notnull 108public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer) where TKey : notnull 121public static ImmutableSortedDictionary<TKey, TValue>.Builder CreateBuilder<TKey, TValue>(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 138public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 171public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TSource, TKey, TValue>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, Func<TSource, TValue> elementSelector, IComparer<TKey>? keyComparer) where TKey : notnull 200public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) where TKey : notnull 220public static ImmutableSortedDictionary<TKey, TValue> ToImmutableSortedDictionary<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> source, IComparer<TKey>? keyComparer) where TKey : notnull
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (2)
39private IComparer<TKey> _keyComparer = Comparer<TKey>.Default; 294public IComparer<TKey> KeyComparer
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (8)
39private readonly IComparer<TKey> _keyComparer; 51internal ImmutableSortedDictionary(IComparer<TKey>? keyComparer = null, IEqualityComparer<TValue>? valueComparer = null) 65private ImmutableSortedDictionary(Node root, int count, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer) 173public IComparer<TKey> KeyComparer 321public ImmutableSortedDictionary<TKey, TValue> WithComparers(IComparer<TKey>? keyComparer, IEqualityComparer<TValue>? valueComparer) 352public ImmutableSortedDictionary<TKey, TValue> WithComparers(IComparer<TKey>? keyComparer) 739private static ImmutableSortedDictionary<TKey, TValue> Wrap(Node root, int count, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer) 775/// <param name="avoidToSortedMap"><c>true</c> when being called from <see cref="WithComparers(IComparer{TKey}, IEqualityComparer{TValue})"/> to avoid a stack overflow.</param>
System\Collections\Immutable\ImmutableSortedDictionary_2.Node.cs (11)
247internal Node Add(TKey key, TValue value, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer, out bool mutated) 265internal Node SetItem(TKey key, TValue value, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer, out bool replacedExistingValue, out bool mutated) 281internal Node Remove(TKey key, IComparer<TKey> keyComparer, out bool mutated) 293internal ref readonly TValue ValueRef(TKey key, IComparer<TKey> keyComparer) 314internal bool TryGetValue(TKey key, IComparer<TKey> keyComparer, [MaybeNullWhen(false)] out TValue value) 345internal bool TryGetKey(TKey equalKey, IComparer<TKey> keyComparer, out TKey actualKey) 371internal bool ContainsKey(TKey key, IComparer<TKey> keyComparer) 413internal bool Contains(KeyValuePair<TKey, TValue> pair, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer) 619private Node SetOrAdd(TKey key, TValue value, IComparer<TKey> keyComparer, IEqualityComparer<TValue> valueComparer, bool overwriteExistingValue, out bool replacedExistingValue, out bool mutated) 680private Node RemoveRecursive(TKey key, IComparer<TKey> keyComparer, out bool mutated) 784private Node Search(TKey key, IComparer<TKey> keyComparer)
System\Collections\Immutable\ImmutableSortedSet.cs (7)
31public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer) 54public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, T item) 77public static ImmutableSortedSet<T> CreateRange<T>(IComparer<T>? comparer, IEnumerable<T> items) 112public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, params T[] items) 126public static ImmutableSortedSet<T> Create<T>(IComparer<T>? comparer, params ReadOnlySpan<T> items) 149public static ImmutableSortedSet<T>.Builder CreateBuilder<T>(IComparer<T>? comparer) 161public static ImmutableSortedSet<TSource> ToImmutableSortedSet<TSource>(this IEnumerable<TSource> source, IComparer<TSource>? comparer)
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (3)
41private IComparer<T> _comparer = Comparer<T>.Default; 135/// Gets or sets the <see cref="IComparer{T}"/> object that is used to determine equality for the values in the <see cref="ImmutableSortedSet{T}"/>. 142public IComparer<T> KeyComparer
System\Collections\Immutable\ImmutableSortedSet_1.cs (8)
49private readonly IComparer<T> _comparer; 55internal ImmutableSortedSet(IComparer<T>? comparer = null) 66private ImmutableSortedSet(Node root, IComparer<T> comparer) 125public IComparer<T> KeyComparer 347public ImmutableSortedSet<T> WithComparer(IComparer<T>? comparer) 1025private static ImmutableSortedSet<T> Wrap(Node root, IComparer<T> comparer) 1147IComparer<T> comparer = this.KeyComparer; 1205IComparer<T> comparer = this.KeyComparer;
System\Collections\Immutable\ImmutableSortedSet_1.Node.cs (5)
339internal Node Add(T key, IComparer<T> comparer, out bool mutated) 385internal Node Remove(T key, IComparer<T> comparer, out bool mutated) 462internal bool Contains(T key, IComparer<T> comparer) 489internal Node Search(T key, IComparer<T> comparer) 521internal int IndexOf(T key, IComparer<T> comparer)
System\Collections\Immutable\SortedInt32KeyNode.cs (2)
17/// each node in the tree during a lookup: an interface call to the comparer's <see cref="IComparer{T}.Compare"/> method, 19/// the comparer's <see cref="IComparer{T}.Compare"/> implementation.
System.Configuration.ConfigurationManager (1)
System\Configuration\BaseConfigurationRecord.cs (1)
137private static readonly IComparer<SectionInput> s_indirectInputsComparer = new IndirectLocationInputComparer();
System.Data.Common (7)
System\Data\EnumerableRowCollection.cs (1)
295internal void AddSortExpression<TKey>(Func<TRow, TKey> keySelector, IComparer<TKey> comparer, bool isDescending, bool isOrderBy)
System\Data\EnumerableRowCollectionExtensions.cs (4)
42public static OrderedEnumerableRowCollection<TRow> OrderBy<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 65public static OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow, TKey>(this EnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 89public static OrderedEnumerableRowCollection<TRow> ThenBy<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer) 113public static OrderedEnumerableRowCollection<TRow> ThenByDescending<TRow, TKey>(this OrderedEnumerableRowCollection<TRow> source, Func<TRow, TKey> keySelector, IComparer<TKey> comparer)
System\Data\TypedTableBaseExtensions.cs (2)
41IComparer<TKey> comparer) where TRow : DataRow 64IComparer<TKey> comparer) where TRow : DataRow
System.Linq (29)
System\Linq\Max.cs (4)
304/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 313public static TSource? Max<TSource>(this IEnumerable<TSource> source, IComparer<TSource>? comparer) 414/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 421public static TSource? MaxBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer)
System\Linq\Min.cs (4)
283/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 292public static TSource? Min<TSource>(this IEnumerable<TSource> source, IComparer<TSource>? comparer) 393/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 400public static TSource? MinBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer)
System\Linq\OrderBy.cs (9)
34/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 45public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source, IComparer<T>? comparer) => 53public static IOrderedEnumerable<TSource> OrderBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 79/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 90public static IOrderedEnumerable<T> OrderDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) => 98public static IOrderedEnumerable<TSource> OrderByDescending<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) => 111public static IOrderedEnumerable<TSource> ThenBy<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 131public static IOrderedEnumerable<TSource> ThenByDescending<TSource, TKey>(this IOrderedEnumerable<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 168IOrderedEnumerable<TElement> CreateOrderedEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending);
System\Linq\OrderedEnumerable.cs (10)
29IOrderedEnumerable<TElement> IOrderedEnumerable<TElement>.CreateOrderedEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending) => 68private readonly IComparer<TKey> _comparer; 73internal OrderedIterator(IEnumerable<TElement> source, Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending, OrderedIterator<TElement>? parent) : 98IComparer<TKey> comparer = _comparer; 101comparer = (IComparer<TKey>)StringComparer.CurrentCulture; 260protected readonly IComparer<TKey> _comparer; 264public CachingComparer(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending) 293public CachingComparerWithChild(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending, CachingComparer<TElement> child) 384private readonly IComparer<TKey> _comparer; 389internal EnumerableSorter(Func<TElement, TKey> keySelector, IComparer<TKey> comparer, bool descending, EnumerableSorter<TElement>? next)
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
270IComparer<TKey> comparer = _comparer; 322IComparer<TKey> comparer = _comparer;
System.Linq.AsyncEnumerable (54)
System\Linq\Empty.cs (2)
36public IOrderedAsyncEnumerable<TResult> CreateOrderedAsyncEnumerable<TKey>(Func<TResult, TKey> keySelector, IComparer<TKey>? comparer, bool descending) 42public IOrderedAsyncEnumerable<TResult> CreateOrderedAsyncEnumerable<TKey>(Func<TResult, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending)
System\Linq\MaxAsync.cs (4)
15/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MaxAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para> 26IComparer<TSource>? comparer = null, 61IComparer<TSource> comparer,
System\Linq\MaxByAsync.cs (6)
17/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 28IComparer<TKey>? comparer = null, 39IComparer<TKey> comparer, 127/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 138IComparer<TKey>? comparer = null, 149IComparer<TKey> comparer,
System\Linq\MinAsync.cs (4)
15/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 21/// <para>If type <typeparamref name="TSource" /> implements <see cref="IComparable{T}" />, the <see cref="MinAsync{TSource}(IAsyncEnumerable{TSource}, IComparer{TSource}?, CancellationToken)" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="IComparable" />, that implementation is used to compare values.</para> 26IComparer<TSource>? comparer = null, 59static async ValueTask<TSource?> Impl(IAsyncEnumerable<TSource> source, IComparer<TSource> comparer, CancellationToken cancellationToken)
System\Linq\MinByAsync.cs (6)
17/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 28IComparer<TKey>? comparer = null, 39IComparer<TKey> comparer, 127/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 138IComparer<TKey>? comparer = null, 149IComparer<TKey> comparer,
System\Linq\OrderBy.cs (32)
16/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 21IComparer<T>? comparer = null) => 29/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 36IComparer<TKey>? comparer = null) 51/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 58IComparer<TKey>? comparer = null) 71/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 76IComparer<T>? comparer = null) => 84/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 91IComparer<TKey>? comparer = null) 106/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 113IComparer<TKey>? comparer = null) 128/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 135IComparer<TKey>? comparer = null) 147/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 154IComparer<TKey>? comparer = null) 166/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 173IComparer<TKey>? comparer = null) 185/// <param name="comparer">An <see cref="IComparer{T}"/> to compare keys.</param> 192IComparer<TKey>? comparer = null) 210public IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending) => 213public IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending) => 223private readonly IComparer<TKey> _comparer; 226internal OrderedIterator(IAsyncEnumerable<TElement> source, object keySelector, IComparer<TKey>? comparer, bool descending, OrderedIterator<TElement>? parent) : 242IComparer<TKey> comparer = _comparer; 245comparer = (IComparer<TKey>)StringComparer.CurrentCulture; 305private readonly IComparer<TKey> _comparer; 310internal EnumerableSorter(object keySelector, IComparer<TKey> comparer, bool descending, EnumerableSorter<TElement>? next) 440/// <param name="comparer">The <see cref="IComparer{T}"/> used to compare keys for placement in the returned sequence.</param> 443IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, TKey> keySelector, IComparer<TKey>? comparer, bool descending); 448/// <param name="comparer">The <see cref="IComparer{T}"/> used to compare keys for placement in the returned sequence.</param> 451IOrderedAsyncEnumerable<TElement> CreateOrderedAsyncEnumerable<TKey>(Func<TElement, CancellationToken, ValueTask<TKey>> keySelector, IComparer<TKey>? comparer, bool descending);
System.Linq.Expressions (1)
System\Linq\Expressions\Interpreter\LightCompiler.cs (1)
218int IComparer<DebugInfo>.Compare(DebugInfo? d1, DebugInfo? d2)
System.Linq.Parallel (74)
System\Linq\Parallel\Merging\OrderPreservingPipeliningMergeHelper.cs (6)
87private readonly IComparer<Producer<TKey>> _producerComparer; 120IComparer<TKey> keyComparer) 140_producerComparer = (IComparer<Producer<TKey>>)(object)ProducerComparerInt.Instance; 191private readonly IComparer<TKey> _keyComparer; 193internal ProducerComparer(IComparer<TKey> keyComparer) 249internal OrderedPipeliningMergeEnumerator(OrderPreservingPipeliningMergeHelper<TOutput, TKey> mergeHelper, IComparer<Producer<TKey>> producerComparer)
System\Linq\Parallel\Partitioning\HashRepartitionStream.cs (1)
45int partitionsCount, IComparer<TOrderKey> orderKeyComparer, IEqualityComparer<THashKey>? hashKeyComparer,
System\Linq\Parallel\Partitioning\PartitionedStream.cs (3)
35private readonly IComparer<TKey> _keyComparer; // Comparer for order keys. 38internal PartitionedStream(int partitionCount, IComparer<TKey> keyComparer, OrdinalIndexState indexState) 87internal IComparer<TKey> KeyComparer
System\Linq\Parallel\QueryOperators\Binary\ConcatQueryOperator.cs (8)
121IComparer<ConcatKey<TLeftKey, TRightKey>> comparer = ConcatKey<TLeftKey, TRightKey>.MakeComparer( 320internal static IComparer<ConcatKey<TLeftKey, TRightKey>> MakeComparer( 321IComparer<TLeftKey> leftComparer, IComparer<TRightKey> rightComparer) 334private readonly IComparer<TLeftKey> _leftComparer; 335private readonly IComparer<TRightKey> _rightComparer; 337internal ConcatKeyComparer(IComparer<TLeftKey> leftComparer, IComparer<TRightKey> rightComparer)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (2)
232private readonly IComparer<TLeftKey> _leftKeyComparer; // A comparer for order keys. 245IEqualityComparer<TInputOutput>? comparer, IComparer<TLeftKey> leftKeyComparer,
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (11)
138IComparer<TRightKey>? rightKeyComparer, IPartitionedStreamRecipient<TOutput> outputRecipient, 144IComparer<Pair<TLeftKey, TRightKey>> outputKeyComparer = new PairComparer<TLeftKey, TRightKey>(leftHashStream.KeyComparer, rightKeyComparer); 158private static PairComparer<bool, TRightKey> CreateComparer<TRightKey>(IComparer<TRightKey> comparer) 163private static PairComparer<TLeftKey, TRightKey> CreateComparer<TLeftKey, TRightKey>(IComparer<TLeftKey> leftKeyComparer, IComparer<TRightKey> rightKeyComparer) 171HashJoinOutputKeyBuilder<TLeftKey, TRightKey, TOutputKey> outputKeyBuilder, IComparer<TOutputKey> outputKeyComparer, 307private readonly IComparer<TOrderKey> _orderKeyComparer; 312IComparer<TOrderKey> orderKeyComparer) 348private readonly IComparer<TOrderKey> _orderKeyComparer; 352IComparer<TOrderKey> orderKeyComparer) 415internal GroupKeyData(TOrderKey orderKey, THashKey hashKey, IComparer<TOrderKey> orderComparer)
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (2)
233private readonly IComparer<TLeftKey> _leftKeyComparer; // Comparer to use to determine ordering of order keys. 244IEqualityComparer<TInputOutput>? comparer, IComparer<TLeftKey> leftKeyComparer,
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (2)
118IComparer<Pair<TLeftKey, TRightKey>> outputKeyComparer = 137HashJoinOutputKeyBuilder<TLeftKey, TRightKey, TOutputKey> outputKeyBuilder, IComparer<TOutputKey> outputKeyComparer,
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (3)
125IComparer<ConcatKey<TLeftKey, TRightKey>> compoundKeyComparer = 296private readonly IComparer<ConcatKey<TLeftKey, TRightKey>> _keyComparer; // Comparer for compound order keys. 312bool leftOrdered, bool rightOrdered, IEqualityComparer<TInputOutput>? comparer, IComparer<ConcatKey<TLeftKey, TRightKey>> keyComparer,
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (2)
195private readonly IComparer<TKey> _keyComparer; // Comparer to decide the key order. 207IEqualityComparer<TInputOutput>? comparer, IComparer<TKey> keyComparer,
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (2)
132private readonly IComparer<TKey> _keyComparer; // Comparer for the order keys 141IComparer<TKey> keyComparer, int partitionId)
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (8)
148IComparer<TKey> orderComparer = hashStream.KeyComparer; 428protected readonly IComparer<TOrderKey> _orderComparer; // The comparison routine for order keys. 443Func<TSource, TGroupKey> keySelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer, 517internal GroupKeyData(TOrderKey orderKey, TGroupKey hashKey, IComparer<TOrderKey> orderComparer) 539Func<TSource, TGroupKey> keySelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer, 612Func<TSource, TGroupKey> keySelector, Func<TSource, TElement> elementSelector, IEqualityComparer<TGroupKey>? keyComparer, IComparer<TOrderKey> orderComparer, 732private readonly IComparer<TOrderKey> _orderComparer; // Comparer for order keys 739IComparer<TOrderKey> orderComparer)
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (2)
128private readonly IComparer<TKey> _keyComparer; // Comparer for the order keys 137IComparer<TKey> keyComparer, int partitionId)
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (4)
26private readonly IComparer<TSortKey> _comparer; // Key comparison logic to use during sorting. 33IComparer<TSortKey>? comparer, bool descending) 55Func<TInputOutput, TKey2> key2Selector, IComparer<TKey2>? key2Comparer, bool descending) 64IComparer<Pair<TSortKey, TKey2>> pairComparer = new PairComparer<TSortKey, TKey2>(_comparer, key2Comparer);
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (2)
156private readonly IComparer<TKey> _keyComparer; // Comparer for the order keys. 173IComparer<TKey> keyComparer)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (2)
211private readonly IComparer<TKey> _keyComparer; // Comparer for the order keys. 230OperatorState<TKey> operatorState, CountdownEvent sharedBarrier, CancellationToken cancelToken, IComparer<TKey> keyComparer)
System\Linq\Parallel\Utils\FixedMaxHeap.cs (2)
23private readonly IComparer<TElement> _comparer; // Element comparison routine. 34internal FixedMaxHeap(int maximumSize, IComparer<TElement> comparer)
System\Linq\Parallel\Utils\PairComparer.cs (4)
22private readonly IComparer<T> _comparer1; 23private readonly IComparer<U>? _comparer2; 25public PairComparer(IComparer<T> comparer1, IComparer<U>? comparer2)
System\Linq\Parallel\Utils\ReverseComparer.cs (2)
22private readonly IComparer<T> _comparer; 24internal ReverseComparer(IComparer<T> comparer)
System\Linq\Parallel\Utils\Sorting.cs (2)
48private readonly IComparer<TKey> _keyComparer; // Comparer for the order keys 59OrdinalIndexState indexState, IComparer<TKey> keyComparer,
System\Linq\ParallelEnumerable.cs (4)
1093this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1147this ParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1208this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer) 1269this OrderedParallelQuery<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey>? comparer)
System.Linq.Queryable (44)
System\Linq\Queryable.cs (44)
713/// <param name="comparer">An <see cref="IComparer{T}"/> to compare elements.</param> 734public static IOrderedQueryable<T> Order<T>(this IQueryable<T> source, IComparer<T> comparer) 741new Func<IQueryable<T>, IComparer<T>, IOrderedQueryable<T>>(Order).Method, 742source.Expression, Expression.Constant(comparer, typeof(IComparer<T>)))); 759public static IOrderedQueryable<TSource> OrderBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 767new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderBy).Method, 768source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 812/// <param name="comparer">An <see cref="IComparer{T}"/> to compare elements.</param> 833public static IOrderedQueryable<T> OrderDescending<T>(this IQueryable<T> source, IComparer<T> comparer) 840new Func<IQueryable<T>, IComparer<T>, IOrderedQueryable<T>>(OrderDescending).Method, 841source.Expression, Expression.Constant(comparer, typeof(IComparer<T>)))); 858public static IOrderedQueryable<TSource> OrderByDescending<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 866new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(OrderByDescending).Method, 867source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 1111public static IOrderedQueryable<TSource> ThenBy<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 1119new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenBy).Method, 1120source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 1137public static IOrderedQueryable<TSource> ThenByDescending<TSource, TKey>(this IOrderedQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 1145new Func<IOrderedQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, IOrderedQueryable<TSource>>(ThenByDescending).Method, 1146source.Expression, Expression.Quote(keySelector), Expression.Constant(comparer, typeof(IComparer<TKey>)))); 2316/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 2321public static TSource? Min<TSource>(this IQueryable<TSource> source, IComparer<TSource>? comparer) 2328new Func<IQueryable<TSource>, IComparer<TSource>, TSource?>(Min).Method, 2330Expression.Constant(comparer, typeof(IComparer<TSource>)))); 2373/// <param name="comparer">The <see cref="IComparer{TSource}" /> to compare elements.</param> 2381public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer) 2389new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MinBy).Method, 2392Expression.Constant(comparer, typeof(IComparer<TSource>)))); 2400/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 2405public static TSource? MinBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 2413new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, TSource?>(MinBy).Method, 2416Expression.Constant(comparer, typeof(IComparer<TKey>)))); 2434/// <param name="comparer">The <see cref="IComparer{T}" /> to compare values.</param> 2438public static TSource? Max<TSource>(this IQueryable<TSource> source, IComparer<TSource>? comparer) 2445new Func<IQueryable<TSource>, IComparer<TSource>, TSource?>(Max).Method, 2447Expression.Constant(comparer, typeof(IComparer<TSource>)))); 2490/// <param name="comparer">The <see cref="IComparer{TSource}" /> to compare elements.</param> 2498public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TSource>? comparer) 2506new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TSource>, TSource?>(MaxBy).Method, 2509Expression.Constant(comparer, typeof(IComparer<TSource>)))); 2517/// <param name="comparer">The <see cref="IComparer{TKey}" /> to compare keys.</param> 2522public static TSource? MaxBy<TSource, TKey>(this IQueryable<TSource> source, Expression<Func<TSource, TKey>> keySelector, IComparer<TKey>? comparer) 2530new Func<IQueryable<TSource>, Expression<Func<TSource, TKey>>, IComparer<TKey>, TSource?>(MaxBy).Method, 2533Expression.Constant(comparer, typeof(IComparer<TKey>))));
System.Private.CoreLib (39)
src\libraries\System.Private.CoreLib\src\System\Array.cs (6)
1378public static int BinarySearch<T>(T[] array, T value, IComparer<T>? comparer) 1390public static int BinarySearch<T>(T[] array, int index, int length, T value, IComparer<T>? comparer) 2520public static void Sort<T>(T[] array, IComparer<T>? comparer) 2527public static void Sort<TKey, TValue>(TKey[] keys, TValue[]? items, IComparer<TKey>? comparer) 2534public static void Sort<T>(T[] array, int index, int length, IComparer<T>? comparer) 2552public static void Sort<TKey, TValue>(TKey[] keys, TValue[]? items, int index, int length, IComparer<TKey>? comparer)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (14)
19public void Sort(Span<T> keys, IComparer<T>? comparer) 38public int BinarySearch(T[] array, int index, int length, T value, IComparer<T>? comparer) 73internal static int InternalBinarySearch(T[] array, int index, int length, T value, IComparer<T> comparer) 283public void Sort(Span<T> keys, IComparer<T>? comparer) 324public int BinarySearch(T[] array, int index, int length, T value, IComparer<T>? comparer) 615public void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 633private static void SwapIfGreaterWithValues(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 666internal static void IntrospectiveSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 677private static void IntroSort(Span<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 723private static int PickPivotAndPartition(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 761private static void HeapSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 779private static void DownHeap(Span<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 806private static void InsertionSort(Span<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 832public void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\List.cs (4)
300public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 315public int BinarySearch(T item, IComparer<T>? comparer) 1089public void Sort(IComparer<T>? comparer) 1100public void Sort(int index, int count, IComparer<T>? comparer)
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (11)
3530public static int SequenceCompareTo<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other, IComparer<T>? comparer = null) 4186/// <typeparam name="TComparer">The specific type of <see cref="IComparer{T}"/>.</typeparam> 4203where TComparer : IComparer<T>, allows ref struct => 4257/// <typeparam name="TComparer">The specific type of <see cref="IComparer{T}"/>.</typeparam> 4273where TComparer : IComparer<T>, allows ref struct 4293Sort(span, (IComparer<T>?)null); 4302/// The <see cref="IComparer{T}"/> implementation to use when comparing elements, or null to 4312public static void Sort<T, TComparer>(this Span<T> span, TComparer comparer) where TComparer : IComparer<T>? 4354Sort(keys, items, (IComparer<TKey>?)null); 4366/// The <see cref="IComparer{T}"/> implementation to use when comparing elements, or null to 4376public static void Sort<TKey, TValue, TComparer>(this Span<TKey> keys, Span<TValue> items, TComparer comparer) where TComparer : IComparer<TKey>?
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.BinarySearch.cs (1)
63where TComparer : IComparer<T>, allows ref struct
src\System\Collections\Generic\ArraySortHelper.CoreCLR.cs (3)
11void Sort(Span<TKey> keys, IComparer<TKey>? comparer); 12int BinarySearch(TKey[] keys, int index, int length, TKey value, IComparer<TKey>? comparer); 45void Sort(Span<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\ClassDataContract.cs (1)
996IComparer<Member> comparer = DataMemberConflictComparer.Singleton;
System.Private.Xml (4)
System\Xml\Core\XmlTextReaderImplHelpers.cs (2)
716private static readonly IComparer<object> s_instance = new DtdDefaultAttributeInfoToNodeDataComparer(); 718internal static IComparer<object> Instance
System\Xml\XPath\Internal\SortQuery.cs (1)
195int IComparer<SortKey>.Compare(SortKey? x, SortKey? y)
System\Xml\Xsl\Runtime\XmlQuerySequence.cs (1)
594public XmlQueryNodeSequence DocOrderDistinct(IComparer<XPathNavigator> comparer)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
80[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.IComparer<>))]
System.Threading.Channels (2)
System\Threading\Channels\ChannelOptions.netcoreapp.cs (1)
12public IComparer<T>? Comparer { get; set; }
System\Threading\Channels\UnboundedPriorityChannel.cs (1)
41internal UnboundedPrioritizedChannel(bool runContinuationsAsynchronously, IComparer<T>? comparer)
System.Windows.Controls.Ribbon (2)
Microsoft\Windows\Controls\Ribbon\Primitives\StarLayoutInfo.cs (2)
74internal static IComparer<StarLayoutInfo> PerStarValueComparer 86internal static IComparer<StarLayoutInfo> PotentialPerStarValueComparer
System.Windows.Forms (8)
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
464int IComparer<Entry>.Compare(Entry? entry1, Entry? entry2)
System\Windows\Forms\Controls\DataGridView\DataGridViewColumnCollection.cs (1)
72internal static IComparer<DataGridViewColumn?> ColumnCollectionOrderComparer => s_columnOrderComparer;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.ObjectCollection.cs (2)
19private IComparer<object>? _comparer; 27private IComparer<object> Comparer => _comparer ??= new ItemComparer(_owner);
System\Windows\Forms\Internal\ItemArray.cs (1)
299int IComparer<Entry>.Compare(Entry? entry1, Entry? entry2)
System\Windows\Forms\Layout\TableLayout.cs (1)
23private static void Sort(LayoutInfo[] array, IComparer<LayoutInfo> comparer)
System\Windows\Forms\Layout\TableLayout.SorterObjectArray.cs (2)
12private readonly IComparer<LayoutInfo> _comparer; 14internal SorterObjectArray(LayoutInfo[] keys, IComparer<LayoutInfo> comparer)
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\CommandSet.cs (1)
3181IComparer<IComponent> comp;
System\Windows\Forms\Design\ComponentTray.cs (1)
2771int IComparer<Control>.Compare(Control o1, Control o2)
Test.Utilities (66)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
Text.Analyzers (74)
src\Dependencies\Collections\Extensions\FixedSizeArrayBuilder.cs (1)
107public readonly void Sort(IComparer<T> comparer)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (10)
597public static bool IsSorted<T>(this IEnumerable<T> enumerable, IComparer<T>? comparer = null) 823/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 825public static IOrderedEnumerable<T> OrderBy<T>(this IEnumerable<T> source, IComparer<T>? comparer) 829/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 831public static IOrderedEnumerable<T> OrderByDescending<T>(this IEnumerable<T> source, IComparer<T>? comparer) 835/// Variant of <see cref="System.Linq.Enumerable.OrderBy{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 841/// Variant of <see cref="System.Linq.Enumerable.OrderByDescending{TSource, TKey}(IEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 847/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/> 849public static IOrderedEnumerable<T> ThenBy<T>(this IOrderedEnumerable<T> source, IComparer<T>? comparer) 853/// Variant of <see cref="System.Linq.Enumerable.ThenBy{TSource, TKey}(IOrderedEnumerable{TSource}, Func{TSource, TKey}, IComparer{TKey}?)"/>
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
758IComparer<TValue>? comparer = null) 982internal static bool IsSorted<T>(this ImmutableArray<T> array, IComparer<T>? comparer = null) 1360/// Variant of <see cref="System.Collections.Immutable.ImmutableArray.BinarySearch{T}(ImmutableArray{T}, T, IComparer{T}?)"/>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (14)
32public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 51public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 84internal static int InternalBinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T> comparer) 297public static void Sort(SegmentedArraySegment<T> keys, IComparer<T>? comparer) 341public static int BinarySearch(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 673public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer) 691private static void SwapIfGreaterWithValues(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer, int i, int j) 724internal static void IntrospectiveSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 735private static void IntroSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, int depthLimit, IComparer<TKey> comparer) 781private static int PickPivotAndPartition(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 826private static void HeapSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 844private static void DownHeap(SegmentedArraySegment<TKey> keys, Span<TValue> values, int i, int n, IComparer<TKey> comparer) 871private static void InsertionSort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey> comparer) 897public static void Sort(SegmentedArraySegment<TKey> keys, Span<TValue> values, IComparer<TKey>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1.cs (8)
192/// <inheritdoc cref="ImmutableList{T}.BinarySearch(T, IComparer{T}?)"/> 193public int BinarySearch(T item, IComparer<T>? comparer) 196/// <inheritdoc cref="ImmutableList{T}.BinarySearch(int, int, T, IComparer{T}?)"/> 197public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 538/// <inheritdoc cref="ImmutableList{T}.Sort(IComparer{T}?)"/> 539public ImmutableSegmentedList<T> Sort(IComparer<T>? comparer) 571/// <inheritdoc cref="ImmutableList{T}.Sort(int, int, IComparer{T}?)"/> 572public ImmutableSegmentedList<T> Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+Builder.cs (8)
65/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(T, IComparer{T}?)"/> 66public int BinarySearch(T item, IComparer<T>? comparer) 69/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.BinarySearch(int, int, T, IComparer{T}?)"/> 70public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 206/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(IComparer{T}?)"/> 207public void Sort(IComparer<T>? comparer) 214/// <inheritdoc cref="System.Collections.Immutable.ImmutableList{T}.Builder.Sort(int, int, IComparer{T}?)"/> 215public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+ValueBuilder.cs (4)
100public readonly int BinarySearch(T item, IComparer<T>? comparer) 103public readonly int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 301public void Sort(IComparer<T>? comparer) 322public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedArray.cs (5)
179public static int BinarySearch<T>(SegmentedArray<T> array, T value, IComparer<T>? comparer) 189public static int BinarySearch<T>(SegmentedArray<T> array, int index, int length, T value, IComparer<T>? comparer) 369SegmentedArraySortHelper<T>.Sort(segment, (IComparer<T>?)null); 378public static void Sort<T>(SegmentedArray<T> array, IComparer<T>? comparer) 383public static void Sort<T>(SegmentedArray<T> array, int index, int length, IComparer<T>? comparer)
src\Dependencies\Collections\Segmented\SegmentedList`1.cs (4)
366public int BinarySearch(int index, int count, T item, IComparer<T>? comparer) 381public int BinarySearch(T item, IComparer<T>? comparer) 1222public void Sort(IComparer<T>? comparer) 1233public void Sort(int index, int count, IComparer<T>? comparer)
src\Dependencies\PooledObjects\ArrayBuilder.cs (3)
327public void Sort(IComparer<T>? comparer) 340public void Sort(int startIndex, IComparer<T> comparer) 707public void SortAndRemoveDuplicates(IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (5)
24public PooledSortedSet(ObjectPool<PooledSortedSet<T>>? pool, IComparer<T>? comparer = null) 47private static readonly ConcurrentDictionary<IComparer<T>, ObjectPool<PooledSortedSet<T>>> s_poolInstancesByComparer = new(); 49private static ObjectPool<PooledSortedSet<T>> CreatePool(IComparer<T>? comparer = null) 63public static PooledSortedSet<T> GetInstance(IComparer<T>? comparer = null) 79public static PooledSortedSet<T> GetInstance(IEnumerable<T> initializer, IComparer<T>? comparer = null)
src\RoslynAnalyzers\Utilities\Compiler\SymbolByDisplayStringComparer.cs (1)
14/// <see cref="IComparer{T}"/> for <see cref="ITypeSymbol"/>s sorted by display strings.
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
379protected abstract IComparer<SyntaxNode> GetMemberComparer();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractFlagsEnumGenerator.cs (1)
206int IComparer<(IFieldSymbol field, ulong value)>.Compare((IFieldSymbol field, ulong value) x, (IFieldSymbol field, ulong value) y)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (6)
193IComparer<TDeclaration> comparerWithoutNameCheck, 194IComparer<TDeclaration> comparerWithNameCheck, 301IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 302IComparer<TDeclarationSyntax> comparerWithNameCheck) 326IComparer<TDeclarationSyntax> comparerWithoutNameCheck, 327IComparer<TDeclarationSyntax> comparerWithNameCheck)
xunit.assert (4)
Comparers.cs (1)
46 static IComparer<T> GetRangeComparer<T>()
RangeAsserts.cs (2)
53 IComparer<T> comparer) 92 IComparer<T> comparer)
Sdk\AssertRangeComparer.cs (1)
22 /// Default implementation of <see cref="IComparer{T}"/> used by the xUnit.net range assertions.