Implemented interface member:
method
CompareTo
System.IComparable<T>.CompareTo(T)
240 references to CompareTo
aspire (1)
Utils\ConsoleActivityLogger.cs (1)
551var sequenceComparison = left.Sequence.CompareTo(right.Sequence);
dotnet-sourcelink (1)
dotnet-svcutil-lib (1)
FrameworkFork\Microsoft.Xml\Xml\schema\DatatypeImplementation.cs (1)
3339return ((int)value1).CompareTo((int)value2);
GenerateDocumentationAndConfigFiles (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
ILCompiler.Compiler (15)
Compiler\DependencyAnalysis\DehydratedDataNode.cs (1)
86Array.Sort(relocSort, (x, y) => y.Value.CompareTo(x.Value));
Compiler\DependencyAnalysis\GenericCompositionNode.cs (1)
86var compare = _details.Length.CompareTo(otherComposition._details.Length);
Compiler\DependencyAnalysis\GenericVarianceNode.cs (1)
114var compare = Variance.Length.CompareTo(other.Variance.Length);
Compiler\DependencyAnalysis\PInvokeMethodFixupNode.cs (1)
227return SignatureBytes.CompareTo(other.SignatureBytes);
Compiler\DependencyAnalysis\SerializedFrozenObjectNode.cs (1)
78return _allocationSiteId.CompareTo(otherFrozenObjectNode._allocationSiteId);
Compiler\DependencyAnalysis\StackTraceMethodMappingNode.cs (3)
59int result = x.OwningTypeHandle.CompareTo(y.OwningTypeHandle); 64result = x.MethodNameHandle.CompareTo(y.MethodNameHandle); 69result = x.MethodSignatureHandle.CompareTo(y.MethodSignatureHandle);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (1)
177int customSort = x.CustomSort.CompareTo(y.CustomSort);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\WasmTypeNode.cs (1)
63int result = _type.SignatureLength.CompareTo(wtn.Type.SignatureLength);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
34return (x.SectionIndex != y.SectionIndex ? x.SectionIndex.CompareTo(y.SectionIndex) : x.Offset.CompareTo(y.Offset));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmSymbolManager.cs (1)
101private static readonly Comparer<WasmSymbol> DefaultSymbolComparer = Comparer<WasmSymbol>.Create(static (x, y) => x.Index.CompareTo(y.Index));
src\runtime\src\coreclr\tools\Common\Microsoft\SourceLink\Tools\SourceLinkMap.cs (1)
98list.Sort((left, right) => -left.FilePath.Path.Length.CompareTo(right.FilePath.Path.Length));
src\runtime\src\coreclr\tools\Common\Pgo\PgoFormat.cs (2)
516return x.ILOffset.CompareTo(y.ILOffset); 529return x.Other.CompareTo(y.Other);
ILCompiler.ReadyToRun (28)
Compiler\DependencyAnalysis\ReadyToRun\FieldFixupSignature.cs (1)
86int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\GenericLookupSignature.cs (2)
195int result = ((int)_runtimeLookupKind).CompareTo((int)otherNode._runtimeLookupKind); 199result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\ILBodyFixupSignature.cs (1)
125int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\ImportThunk.cs (1)
86int result = ((int)_thunkKind).CompareTo((int)otherNode._thunkKind);
Compiler\DependencyAnalysis\ReadyToRun\InliningInfoNode.cs (1)
269result = indexA.CompareTo(indexB);
Compiler\DependencyAnalysis\ReadyToRun\MethodFixupSignature.cs (1)
215int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\MethodWithGCInfo.cs (3)
129int result = a.TableIndex.CompareTo(b.TableIndex); 132result = a.ImportOffset.CompareTo(b.ImportOffset); 437result = methodLayoutRank.CompareTo(otherLayoutRank);
Compiler\DependencyAnalysis\ReadyToRun\ModuleToken.cs (1)
69int result = ((int)Token).CompareTo((int)other.Token);
Compiler\DependencyAnalysis\ReadyToRun\StoreMultiCallableAddrOfCodeSignature.cs (1)
88return _locationOffset.CompareTo(otherNode._locationOffset);
Compiler\DependencyAnalysis\ReadyToRun\TypeFixupSignature.cs (1)
197int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\VirtualResolutionFixupSignature.cs (1)
78int result = ((int)_fixupKind).CompareTo((int)otherNode._fixupKind);
Compiler\DependencyAnalysis\ReadyToRun\WasmImportThunk.cs (1)
129int result = ((int)_thunkKind).CompareTo((int)otherNode._thunkKind);
Compiler\FileLayoutOptimizer.cs (4)
154methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => ComputeHotColdRegion(left).CompareTo(ComputeHotColdRegion(right))); 167methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => ComputeHotWarmColdRegion(left).CompareTo(ComputeHotWarmColdRegion(right))); 232methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => order[left].CompareTo(order[right])); 297callList.Sort((a, b) => b.Count.CompareTo(a.Count));
ObjectWriter\MapFileBuilder.cs (2)
131nodeTypeStats.Sort((a, b) => b.Length.CompareTo(a.Length)); 170Array.Sort(relocTypeCounts, (a, b) => b.Value.CompareTo(a.Value));
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\SortableDependencyNode.cs (1)
177int customSort = x.CustomSort.CompareTo(y.CustomSort);
src\runtime\src\coreclr\tools\Common\Compiler\DependencyAnalysis\WasmTypeNode.cs (1)
63int result = _type.SignatureLength.CompareTo(wtn.Type.SignatureLength);
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
34return (x.SectionIndex != y.SectionIndex ? x.SectionIndex.CompareTo(y.SectionIndex) : x.Offset.CompareTo(y.Offset));
src\runtime\src\coreclr\tools\Common\Compiler\ObjectWriter\WasmSymbolManager.cs (1)
101private static readonly Comparer<WasmSymbol> DefaultSymbolComparer = Comparer<WasmSymbol>.Create(static (x, y) => x.Index.CompareTo(y.Index));
src\runtime\src\coreclr\tools\Common\Pgo\PgoFormat.cs (2)
516return x.ILOffset.CompareTo(y.ILOffset); 529return x.Other.CompareTo(y.Other);
TypeSystem\Mutable\MutableModule.cs (1)
383return ModuleTypeSort.CompareTo(other.ModuleTypeSort);
ILCompiler.RyuJit (3)
src\runtime\src\coreclr\tools\aot\ILCompiler.ReadyToRun\Compiler\FileLayoutOptimizer.cs (3)
154methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => ComputeHotColdRegion(left).CompareTo(ComputeHotColdRegion(right))); 167methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => ComputeHotWarmColdRegion(left).CompareTo(ComputeHotWarmColdRegion(right))); 232methods.MergeSortAllowDuplicates((MethodWithGCInfo left, MethodWithGCInfo right) => order[left].CompareTo(order[right]));
ILCompiler.TypeSystem (11)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\FieldLayoutIntervalCalculator.cs (1)
41return Start.CompareTo(other.Start);
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\ImpliedRepeatedFieldDesc.Sorting.cs (1)
19return FieldIndex.CompareTo(impliedRepeatedFieldDesc.FieldIndex);
src\runtime\src\coreclr\tools\Common\TypeSystem\Ecma\IEcmaModule.cs (1)
65return ModuleTypeSort.CompareTo(other.ModuleTypeSort);
src\runtime\src\coreclr\tools\Common\TypeSystem\IL\Stubs\ILEmitter.cs (2)
832int offsetComparison = b.TryOffset.CompareTo(a.TryOffset); 836return a.TryLength.CompareTo(b.TryLength);
src\runtime\src\coreclr\tools\Common\TypeSystem\Sorting\MethodSignature.Sorting.cs (6)
11int result = _parameters.Length.CompareTo(other._parameters.Length); 15result = ((int)_flags).CompareTo((int)other._flags); 19result = _genericParameterCount.CompareTo(other._genericParameterCount); 37return (_embeddedSignatureData?.Length ?? 0).CompareTo(other._embeddedSignatureData?.Length ?? 0); 39result = _embeddedSignatureData.Length.CompareTo(other._embeddedSignatureData.Length); 52result = ((int)thisData.kind).CompareTo((int)otherData.kind);
illink (2)
Microsoft.AspNetCore.Components.Endpoints (1)
Builder\ResourcePreloadCollection.cs (1)
48group.Value.Sort((a, b) => a.PreloadOrder.CompareTo(b.PreloadOrder));
Microsoft.AspNetCore.Mvc.Core (2)
Filters\FilterDescriptorOrderComparer.cs (2)
17return x.Scope.CompareTo(y.Scope); 21return x.Order.CompareTo(y.Order);
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperRunner.cs (1)
65=> left.Order.CompareTo(right.Order);
Microsoft.AspNetCore.Routing (10)
Matching\AcceptsMatcherPolicy.cs (1)
272Array.Sort(ordered, static (left, right) => GetScore(left.mediaType).CompareTo(GetScore(right.mediaType)));
Matching\DfaMatcherBuilder.cs (1)
98return x.PrecedenceDigit.CompareTo(y.PrecedenceDigit);
Matching\EndpointComparer.cs (1)
119return routeEndpointX.Order.CompareTo(routeEndpointY.Order);
Matching\HostMatcherPolicy.cs (1)
308Array.Sort(ordered, static (left, right) => GetScore(left.host).CompareTo(GetScore(right.host)));
Matching\ILEmitTrieFactory.cs (5)
111Array.Sort(groups, static (a, b) => a.Key.CompareTo(b.Key)); 131groups.Sort(static (a, b) => b.Count().CompareTo(a.Count())); 351groups.Sort(static (a, b) => b.Count().CompareTo(a.Count())); 461Array.Sort(groups, static (a, b) => (a.Key | 0x20).CompareTo(b.Key | 0x20)); 476groups.Sort(static (a, b) => b.Count().CompareTo(a.Count()));
Tree\LinkGenerationDecisionTree.cs (1)
195return x.Match.Entry.Order.CompareTo(y.Match.Entry.Order);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\SniOptionsSelector.cs (1)
241var lengthResult = y!.Length.CompareTo(x!.Length);
Microsoft.Build (7)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (4)
491processes.Sort(static (left, right) => left.Id.CompareTo(right.Id)); 621filtered.Sort(static (left, right) => left.Id.CompareTo(right.Id)); 785filteredProcesses.Sort((left, right) => left.Id.CompareTo(right.Id)); 789Array.Sort(processes, (left, right) => left.Id.CompareTo(right.Id));
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
1057Array.Sort(resultsArray, (left, right) => left.NodeRequestId.CompareTo(right.NodeRequestId));
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (1)
52resolvers.Sort((left, right) => left.Priority.CompareTo(right.Priority));
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
306resolvers.Sort((l, r) => l.Priority.CompareTo(r.Priority));
Microsoft.Build.Tasks.Git (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.CodeAnalysis (15)
CodeGen\DebugId.cs (2)
43=> Ordinal.CompareTo(other.Ordinal) is int result and not 0 ? result : Generation.CompareTo(other.Generation);
CodeGen\LocalScopeManager.cs (2)
884var result = x.StartOffset.CompareTo(y.StartOffset); 885return (result == 0) ? y.EndOffset.CompareTo(x.EndOffset) : result;
CommandLine\AnalyzerConfig.cs (1)
107(e1, e2) => e1.NormalizedDirectory.Length.CompareTo(e2.NormalizedDirectory.Length));
CommandLine\CommandLineParser.cs (1)
1408=> pathMap.Sort((x, y) => -x.Key.Length.CompareTo(y.Key.Length));
CommandLine\SarifV2ErrorLogger.cs (1)
509list.Sort((x, y) => x.Index.CompareTo(y.Index));
Emit\EditAndContinue\DeltaMetadataWriter.cs (3)
1034int result = xOrdinal.CompareTo(yOrdinal); 1047result = xOrdinal.CompareTo(yOrdinal); 1663=> rows.Sort((x, y) => GetRowId(x).CompareTo(GetRowId(y)));
Operations\ControlFlowGraphBuilder.RegionBuilder.cs (1)
335CaptureIds?.Sort((x, y) => x.Value.CompareTo(y.Value));
Syntax\LineDirectiveMap.LineMappingEntry.cs (1)
119=> UnmappedLine.CompareTo(other.UnmappedLine);
Text\LinePosition.cs (2)
138int result = _line.CompareTo(other._line); 139return (result != 0) ? result : _character.CompareTo(other.Character);
Text\SourceText.cs (1)
1022public int Compare(uint x, uint y) => GetLineStart(x).CompareTo(GetLineStart(y));
Microsoft.CodeAnalysis.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
Microsoft.CodeAnalysis.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
52return xDist.CompareTo(yDist);
Microsoft.CodeAnalysis.CSharp (4)
Emitter\Model\PEModuleBuilder.cs (1)
654groupingTypes.Sort((x, y) => x.MetadataToken.CompareTo(y.MetadataToken));
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
33private static readonly Func<(int position, Snapshot snapshot), int, int> BinarySearchComparer = (current, target) => current.position.CompareTo(target);
Symbols\Source\SourceMemberContainerSymbol.cs (1)
1362int index = initializers.BinarySearch(position, (initializer, pos) => initializer.Syntax.Span.Start.CompareTo(pos));
Syntax\NullableContextStateMap.cs (1)
183return x.Position.CompareTo(y.Position);
Microsoft.CodeAnalysis.CSharp.Features (1)
Structure\Providers\CompilationUnitStructureProvider.cs (1)
30externsAndUsings.Sort((node1, node2) => node1.SpanStart.CompareTo(node2.SpanStart));
Microsoft.CodeAnalysis.Features (8)
ChangeSignature\AbstractChangeSignatureService.cs (1)
500argumentsToPermute.Sort((a1, a2) => { return parameterToIndexMap[argumentToParameterMap[a1]].CompareTo(parameterToIndexMap[argumentToParameterMap[a2]]); });
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
2442return (result != 0) ? result : x.oldStartLine.CompareTo(y.oldStartLine);
EditAndContinue\ActiveStatementsMap.cs (1)
244Debug.Assert(builder.IsSorted(Comparer<UnmappedActiveStatement>.Create((x, y) => x.UnmappedSpan.Start.CompareTo(y.UnmappedSpan.End))));
EditAndContinue\DocumentAnalysisResults.cs (1)
157(x, y) => x.OldLine.CompareTo(y.OldLine)))));
EditAndContinue\MemberBody.cs (1)
69startPositionComparer: (x, y) => x.UnmappedSpan.Start.CompareTo(y));
PdbSourceDocument\SourceLinkMap.cs (1)
105list.Sort((left, right) => -left.FilePath.Path.Length.CompareTo(right.FilePath.Path.Length));
src\roslyn\src\Analyzers\Core\CodeFixes\AddExplicitCast\InheritanceDistanceComparer.cs (1)
52return xDist.CompareTo(yDist);
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.Razor.Compiler (5)
Language\Components\ComponentBindLoweringPass.cs (1)
370toRemove.Sort(static (x, y) => x.Index.CompareTo(y.Index));
Language\RazorLanguageVersion.cs (2)
98var result = Major.CompareTo(other.Major); 104return Minor.CompareTo(other.Minor);
Language\SourceSpan.cs (2)
121var cmpByStart = AbsoluteIndex.CompareTo(other.AbsoluteIndex); 127return Length.CompareTo(other.Length);
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
Microsoft.CodeAnalysis.Workspaces (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
Workspace\Solution\SolutionCompilationState.RootedSymbolSet.cs (2)
89secondarySymbols.Sort(static (x, y) => x.hashCode.CompareTo(y.hashCode)); 123var index = secondarySymbols.BinarySearch(symbolHash, static (item, symbolHash) => item.hashCode.CompareTo(symbolHash));
Microsoft.Deployment.DotNet.Releases (4)
ReleaseVersion.cs (4)
184int result = Major.CompareTo(value.Major); 190result = Minor.CompareTo(value.Minor); 196result = Patch.CompareTo(value.Patch); 507return dotPartsA.Length.CompareTo(dotPartsB.Length);
Microsoft.Extensions.AI (1)
ChatRouting\SemanticRoutingChatClient.cs (1)
234: left.ProfileIndex.CompareTo(right.ProfileIndex);
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Utilities\IterationNameComparer.cs (1)
18return firstInteger.CompareTo(secondInteger);
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteChain.cs (1)
52ordered.Sort((a, b) => a.Value.Order.CompareTo(b.Value.Order));
ServiceLookup\CallSiteFactory.cs (1)
366callSitesByIndex.Sort((a, b) => a.Key.CompareTo(b.Key));
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
parent\parent\parent\eng\MSBuild\parent\parent\src\Shared\StringSplit\StringRange.cs (1)
50public int CompareTo(StringRange other) => Index.CompareTo(other.Index);
Microsoft.Interop.SourceGeneration (2)
BoundGenerators.cs (2)
120managedParamMarshallers.Sort(static (m1, m2) => m1.TypeInfo.ManagedIndex.CompareTo(m2.TypeInfo.ManagedIndex)); 121nativeParamMarshallers.Sort(static (m1, m2) => m1.TypeInfo.NativeIndex.CompareTo(m2.TypeInfo.NativeIndex));
Microsoft.Maui.Controls (3)
Menu\MenuBarTracker.cs (1)
68 public int Compare(MenuBarItem x, MenuBarItem y) => x.Priority.CompareTo(y.Priority);
Toolbar\ToolbarTracker.cs (1)
22 public int Compare(ToolbarItem x, ToolbarItem y) => x.Priority.CompareTo(y.Priority);
WebView\WebView.cs (1)
315 uniqueMatches.Sort((x, y) => y.Length.CompareTo(x.Length));
Microsoft.ML.Data (6)
DataLoadSave\Database\DatabaseLoader.cs (1)
425Array.Sort(order, (x, y) => segs[x].Min.CompareTo(segs[y].Min));
DataLoadSave\Text\TextLoader.cs (2)
641Array.Sort(order, (x, y) => segs[x].Min.CompareTo(segs[y].Min)); 869segsAll.Sort((s1, s2) => s1.Min.CompareTo(s2.Min));
Evaluators\RankingEvaluator.cs (1)
1072return i.CompareTo(j);
Transforms\NormalizeColumnDbl.cs (1)
542int comparison = belowMedianHeap.Count().CompareTo(aboveMedianHeap.Count());
Transforms\NormalizeColumnSng.cs (1)
702int comparison = belowMedianHeap.Count().CompareTo(aboveMedianHeap.Count());
Microsoft.ML.FastTree (3)
Training\DcgPermutationComparer.cs (3)
73return i.CompareTo(j); 101return i.CompareTo(j); 113return -i.CompareTo(j);
Microsoft.ML.Tokenizers (7)
Model\CodeGenTokenizer.cs (2)
1821return Score.CompareTo(other.Score); 1824return Left.CompareTo(other.Left);
Model\Merge.cs (2)
29return Rank.CompareTo(other.Rank); 32return Pos.CompareTo(other.Pos);
Model\SentencePieceBpeModel.cs (1)
1244return other.Left.CompareTo(Left);
Utils\BytePairEncoder.cs (2)
147int rankComparison = Rank.CompareTo(other.Rank); 152return Start.CompareTo(other.Start);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (5)
DefineStaticWebAssetEndpoints.cs (1)
70Array.Sort(result, (x, y) => x.Priority.CompareTo(y.Priority));
DefineStaticWebAssets.cs (1)
791definitions.Sort((a, b) => a.Order.CompareTo(b.Order));
GenerateStaticWebAssetsDevelopmentManifest.cs (2)
84var lengthResult = x.Item1.Length.CompareTo(y.Item1.Length); 385return PathSegments.Length.CompareTo(other.PathSegments.Length);
OverrideHtmlAssetPlaceholders.cs (1)
150links.Sort((a, b) => a.Order.CompareTo(b.Order));
Microsoft.SourceLink.AzureDevOpsServer.Git (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.AzureRepos.Git (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.Bitbucket.Git (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.Common (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.Gitea (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.Gitee (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.GitHub (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.GitLab (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.GitWeb (1)
src\sourcelink\src\Common\Utilities\SequenceComparer.cs (1)
36return leftLength.CompareTo(rightLength);
Microsoft.SourceLink.Tools.Package (1)
SourceLinkMap.cs (1)
125list.Sort((left, right) => -left.FilePath.Path.Length.CompareTo(right.FilePath.Path.Length));
Microsoft.VisualStudio.TestPlatform.ObjectModel (1)
Nuget.Frameworks\FrameworkNameProvider.cs (1)
1040return xIndex.CompareTo(yIndex);
Mono.Cecil (1)
Mono.Cecil.Metadata\Buffers.cs (1)
425 return y.Length.CompareTo (x.Length);
Mono.Cecil.Mdb (2)
Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs (2)
202 l1.Column.CompareTo (l2.Column) : 203 l1.Row.CompareTo (l2.Row);
NuGet.Frameworks (1)
FrameworkNameProvider.cs (1)
1052return xIndex.CompareTo(yIndex);
NuGet.LibraryModel (2)
DownloadDependency.cs (1)
61compare = VersionRange.GetHashCode().CompareTo(other.VersionRange.GetHashCode());
FrameworkDependency.cs (1)
37return thisPrivateAssets.CompareTo(otherPrivateAssets);
NuGet.PackageManagement (2)
Utility\XElementExtensions.cs (2)
218return rightNameMatches.CompareTo(leftNameMatches); 221return rightExactMathes.CompareTo(leftExactMathes);
NuGet.Packaging (2)
PackageCreation\Extensions\XElementExtensions.cs (2)
106return rightNameMatches.CompareTo(leftNameMatches); 109return rightExactMathes.CompareTo(leftExactMathes);
NuGet.Protocol (2)
SourceRepository.cs (2)
201cmp = a.After.Count().CompareTo(b.After.Count()); 203return a.Before.Count().CompareTo(b.Before.Count());
NuGet.Versioning (4)
VersionComparer.cs (4)
165var result = x.Major.CompareTo(y.Major); 171result = x.Minor.CompareTo(y.Minor); 177result = x.Patch.CompareTo(y.Patch); 334result = version1Num.CompareTo(version2Num);
PresentationFramework (4)
System\Windows\Documents\FixedNode.cs (3)
166int comp = this.Page.CompareTo(fixedNode.Page); 180return thisIndex.CompareTo(fixedNodeIndex); 202return childPath[i].CompareTo(_path[i + 1]);
System\Windows\Documents\FlowPosition.cs (1)
750comp = this._offset.CompareTo(flow._offset);
Roslyn.Diagnostics.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Collections\NormalizedTextSpanCollection.cs (1)
599sorted.Sort(delegate (TextSpan s1, TextSpan s2) { return s1.Start.CompareTo(s2.Start); });
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
927condDirectivesBuilder.Sort(static (n1, n2) => n1.SpanStart.CompareTo(n2.SpanStart));
System.Data.Common (5)
System\Data\Common\Int32Storage.cs (1)
196return valueNo1.CompareTo((int)value);
System\Data\Filter\BinaryNode.cs (2)
180return Convert.ToInt32(vLeft, FormatProvider).CompareTo(Convert.ToInt32(vRight, FormatProvider)); 187return Convert.ToInt32(vLeft, FormatProvider).CompareTo(Convert.ToInt32(vRight, FormatProvider));
System\Data\Selection.cs (2)
331return _table.Rows.IndexOf(row1).CompareTo(_table.Rows.IndexOf(row2)); 381diff = ((int)row1.GetRecordState(record1)).CompareTo((int)row2.GetRecordState(record2));
System.IO.Packaging (1)
System\IO\Packaging\ZipPackagePartPiece.cs (1)
195result = PieceNumber.CompareTo(other.PieceNumber);
System.Linq.Parallel (1)
System\Linq\Parallel\Utils\Util.cs (1)
68return x.CompareTo(y);
System.Private.CoreLib (8)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Enum.cs (1)
1310return Unsafe.As<byte, int>(ref pThisValue).CompareTo(Unsafe.As<byte, int>(ref pTargetValue));
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\IcuLocaleData.cs (1)
3721int order = array_value.CompareTo(culture);
src\runtime\src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (1)
3572return span.Length.CompareTo(other.Length);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Numerics\TotalOrderIeee754Comparer.cs (3)
216int bitComparison = xExponentBits.CompareTo(yExponentBits); 285return xSignificandBits.CompareTo(ySignificandBits); 387int exponentComparison = x.UnbiasedExponent.CompareTo(y.UnbiasedExponent);
src\runtime\src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
65normalizedValues.Sort(static (a, b) => a.Length.CompareTo(b.Length));
src\runtime\src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (1)
1458return firstLength.CompareTo(secondLength);
System.Private.StackTraceMetadata (1)
Internal\StackTraceMetadata\StackTraceMetadata.cs (1)
545public int CompareTo(StackTraceData other) => Rva.CompareTo(other.Rva);
System.Private.Xml (4)
System\Xml\Schema\DataTypeImplementation.cs (1)
3275return ((int)value1).CompareTo((int)value2);
System\Xml\Xsl\Xslt\Compiler.cs (3)
378int result = _moduleOrder[x.FileName].CompareTo(_moduleOrder[y.FileName]); 382result = x.Line.CompareTo(y.Line); 386result = x.Column.CompareTo(y.Column);
System.Reflection.Emit (2)
System\Reflection\Emit\ModuleBuilderImpl.cs (2)
189int primary = CodedIndex.TypeOrMethodDef(x._parentHandle).CompareTo(CodedIndex.TypeOrMethodDef(y._parentHandle)); 193return x.GenericParameterPosition.CompareTo(y.GenericParameterPosition);
System.Reflection.Metadata (1)
System\Reflection\Metadata\Ecma335\MetadataBuilder.Heaps.cs (1)
601return y.Length.CompareTo(x.Length);
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\SignedXml.cs (1)
875return iLevelA.CompareTo(iLevelB);
System.Text.RegularExpressions (7)
System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
347fixedDistanceSets.Sort((s1, s2) => s1.Distance.CompareTo(s2.Distance));
System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (4)
832return s1CharsLength.CompareTo(s2CharsLength); 856int c = Math.Max(s1CharsLength, s1RangeLength).CompareTo(Math.Max(s2CharsLength, s2RangeLength)); 882return s1RangeLength.CompareTo(s2RangeLength); 886return s1.Distance.CompareTo(s2.Distance);
System\Text\RegularExpressions\Symbolic\BDD.cs (1)
536Ordinal.CompareTo(other.Ordinal);
System\Text\RegularExpressions\Symbolic\BitVector.cs (1)
194Length != other.Length ? Length.CompareTo(other.Length) :
System.Text.RegularExpressions.Generator (7)
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexFindOptimizations.cs (1)
347fixedDistanceSets.Sort((s1, s2) => s1.Distance.CompareTo(s2.Distance));
src\runtime\src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexPrefixAnalyzer.cs (4)
832return s1CharsLength.CompareTo(s2CharsLength); 856int c = Math.Max(s1CharsLength, s1RangeLength).CompareTo(Math.Max(s2CharsLength, s2RangeLength)); 882return s1RangeLength.CompareTo(s2RangeLength); 886return s1.Distance.CompareTo(s2.Distance);
UpgradeToGeneratedRegexCodeFixer.cs (2)
555cmp = a.TreeIndex.CompareTo(b.TreeIndex); 556return cmp != 0 ? cmp : a.Position.CompareTo(b.Position);
System.Windows.Forms (1)
System\Windows\Forms\Control.cs (1)
7566static (left, right) => GetLayoutDepth(right.Target).CompareTo(GetLayoutDepth(left.Target)));