260 references to Default
Microsoft.AspNetCore.Routing (2)
Matching\HostMatcherPolicy.cs (2)
426var result = Comparer<string>.Default.Compare(Host, other.Host); 432return Comparer<int?>.Default.Compare(Port, other.Port);
Microsoft.Build (8)
BackEnd\Components\Scheduler\Scheduler.cs (2)
1025return Comparer<int>.Default.Compare(_schedulingData.GetConfigurationsCountByNode(left, true /* excludeTraversals */, _configCache), _schedulingData.GetConfigurationsCountByNode(right, true /* excludeTraversals */, _configCache)); 1309return Comparer<int>.Default.Compare(configurationCountsByNode[left], configurationCountsByNode[right]);
BackEnd\Components\Scheduler\SchedulingPlan.cs (6)
114configurationsInOrder.Sort((KeyValuePair<int, double> l, KeyValuePair<int, double> r) => Comparer<int>.Default.Compare(l.Key, r.Key)); 237projectsInOrderOfTotalPlanTime.Sort((left, right) => Comparer<double>.Default.Compare(right.Value.TotalPlanTime, left.Value.TotalPlanTime)); 260projectsInOrderOfImmediateChildCount.Sort((left, right) => Comparer<int>.Default.Compare(right.Value.ReferencesCount, left.Value.ReferencesCount)); 276projectsInOrderOfReference.Sort(delegate (int left, int right) { return -Comparer<int>.Default.Compare(_configIdToPaths[left].Count, _configIdToPaths[right].Count); }); 337projectsByExpense.Sort(delegate (PlanConfigData left, PlanConfigData right) { return -Comparer<double>.Default.Compare(left.AccumulatedTime, right.AccumulatedTime); }); 345pathsByLength.Sort(delegate (Stack<PlanConfigData> left, Stack<PlanConfigData> right) { return Comparer<int>.Default.Compare(left.Count, right.Count); });
Microsoft.Build.Engine.UnitTests (1)
Evaluation\SimpleVersion_Tests.cs (1)
128Assert.Equal(expectedSign, Comparer<SimpleVersion>.Default.Compare(version1, version2));
Microsoft.Build.Framework (6)
ArraySortHelper.cs (6)
34comparer ??= Comparer<T>.Default; 51comparer ??= Comparer<T>.Default; 296if (comparer == null || comparer == Comparer<T>.Default) 342if (comparer == null || comparer == Comparer<T>.Default) 675IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
Microsoft.CodeAnalysis (11)
Collections\ImmutableArrayExtensions.cs (1)
1300comparer ??= Comparer<T>.Default;
CommandLine\SarifV2ErrorLogger.cs (1)
389foreach (var severity in severities.OrderBy(Comparer<ReportDiagnostic>.Default))
InternalUtilities\EnumerableExtensions.cs (3)
645return source.OrderBy(Comparer<T>.Default); 660return source.ThenBy(Comparer<T>.Default); 671comparer ??= Comparer<T>.Default;
src\Dependencies\Collections\Internal\ArraySortHelper.cs (6)
36comparer ??= Comparer<T>.Default; 53comparer ??= Comparer<T>.Default; 299if (comparer == null || comparer == Comparer<T>.Default) 345if (comparer == null || comparer == Comparer<T>.Default) 677IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
Microsoft.CodeAnalysis.CodeStyle (11)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
1300comparer ??= Comparer<T>.Default;
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
645return source.OrderBy(Comparer<T>.Default); 660return source.ThenBy(Comparer<T>.Default); 671comparer ??= Comparer<T>.Default;
src\Dependencies\Collections\Internal\ArraySortHelper.cs (6)
36comparer ??= Comparer<T>.Default; 53comparer ??= Comparer<T>.Default; 299if (comparer == null || comparer == Comparer<T>.Default) 345if (comparer == null || comparer == Comparer<T>.Default) 677IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (1)
87=> Sort(Comparer<T>.Default);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
167? Comparer<object>.Default.Compare(f1.ConstantValue, f2.ConstantValue!)
Microsoft.CodeAnalysis.Collections.Package (6)
Internal\ArraySortHelper.cs (6)
36comparer ??= Comparer<T>.Default; 53comparer ??= Comparer<T>.Default; 299if (comparer == null || comparer == Comparer<T>.Default) 345if (comparer == null || comparer == Comparer<T>.Default) 677IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
Microsoft.CodeAnalysis.CSharp.Features (1)
Organizing\Organizers\MemberDeclarationsOrganizer.Comparer.cs (1)
94if ((compare = Comparer<bool>.Default.Inverse().Compare(xIsStatic, yIsStatic)) != 0)
Microsoft.CodeAnalysis.EditorFeatures (2)
Extensibility\NavigationBar\WrappedNavigationBarItem.cs (1)
41spans.SortAndRemoveDuplicates(Comparer<TextSpan>.Default);
IntelliSense\AsyncCompletion\ItemManager.cs (1)
193return Comparer<RoslynCompletionItem>.Default.Compare(xRoslyn, yRoslyn);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
395foreach (var effectiveSeverity in effectiveSeverities.OrderBy(Comparer<ReportDiagnostic>.Default))
Microsoft.CodeAnalysis.UnitTests (10)
Collections\ArrayBuilderTests.cs (6)
60builder.SortAndRemoveDuplicates(Comparer<int>.Default); 64builder.SortAndRemoveDuplicates(Comparer<int>.Default); 68builder.SortAndRemoveDuplicates(Comparer<int>.Default); 72builder.SortAndRemoveDuplicates(Comparer<int>.Default); 76builder.SortAndRemoveDuplicates(Comparer<int>.Default); 80builder.SortAndRemoveDuplicates(Comparer<int>.Default);
Collections\ImmutableListTestBase.cs (1)
488inputData = inputData.Sort(sortedIndex, sortedLength, Comparer<int>.Default);
Collections\List\SegmentedList.Generic.Tests.Sort.cs (2)
37IComparer<T> comparer = Comparer<T>.Default; 51IComparer<T> comparer = Comparer<T>.Default;
Collections\List\TestBase.Generic.cs (1)
44protected virtual IComparer<T> GetIComparer() => Comparer<T>.Default;
Microsoft.CodeAnalysis.Workspaces (12)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
1300comparer ??= Comparer<T>.Default;
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
645return source.OrderBy(Comparer<T>.Default); 660return source.ThenBy(Comparer<T>.Default); 671comparer ??= Comparer<T>.Default;
src\Dependencies\Collections\Internal\ArraySortHelper.cs (6)
36comparer ??= Comparer<T>.Default; 53comparer ??= Comparer<T>.Default; 299if (comparer == null || comparer == Comparer<T>.Default) 345if (comparer == null || comparer == Comparer<T>.Default) 677IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (1)
87=> Sort(Comparer<T>.Default);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (1)
167? Comparer<object>.Default.Compare(f1.ConstantValue, f2.ConstantValue!)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (11)
src\Compilers\Core\Portable\Collections\ImmutableArrayExtensions.cs (1)
1300comparer ??= Comparer<T>.Default;
src\Compilers\Core\Portable\InternalUtilities\EnumerableExtensions.cs (3)
645return source.OrderBy(Comparer<T>.Default); 660return source.ThenBy(Comparer<T>.Default); 671comparer ??= Comparer<T>.Default;
src\Dependencies\Collections\Internal\ArraySortHelper.cs (6)
36comparer ??= Comparer<T>.Default; 53comparer ??= Comparer<T>.Default; 299if (comparer == null || comparer == Comparer<T>.Default) 345if (comparer == null || comparer == Comparer<T>.Default) 677IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 901if (comparer == null || comparer == Comparer<TKey>.Default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\FixedSizeArrayBuilder.cs (1)
87=> Sort(Comparer<T>.Default);
Microsoft.Data.Analysis (4)
DataFrameColumns\StringDataFrameColumn.cs (1)
207var comparer = Comparer<string>.Default;
PrimitiveDataFrameColumn.cs (2)
698Comparer<T> comparer = Comparer<T>.Default; 731Comparer<T> comparer = Comparer<T>.Default;
PrimitiveDataFrameColumn.Sort.cs (1)
23var comparer = Comparer<T>.Default;
Microsoft.ML.Core (1)
Utilities\VBufferUtils.cs (1)
327pred = pred ?? ((ref T val) => Comparer<T>.Default.Compare(val, default(T)) == 0);
Microsoft.ML.FastTree (1)
Training\EnsembleCompression\LassoBasedEnsembleCompressor.cs (1)
102return Comparer<double>.Default.Compare(c1.Value, c2.Value);
System.Collections (20)
System\Collections\Generic\PriorityQueue.cs (12)
94/// Uses <see cref="Comparer{T}.Default" /> if the argument is <see langword="null"/>. 109/// Uses <see cref="Comparer{T}.Default" /> if the argument is <see langword="null"/>. 147/// Uses <see cref="Comparer{T}.Default" /> if the argument is <see langword="null"/>. 177public IComparer<TPriority> Comparer => _comparer ?? Comparer<TPriority>.Default; 274if (Comparer<TPriority>.Default.Compare(priority, root.Priority) > 0) 369if (Comparer<TPriority>.Default.Compare(priority, root.Priority) > 0) 540if (Comparer<TPriority>.Default.Compare(lastNode.Priority, priority) < 0) 731if (Comparer<TPriority>.Default.Compare(node.Priority, parent.Priority) < 0) 804if (Comparer<TPriority>.Default.Compare(nextChild.Priority, minChild.Priority) < 0) 812if (Comparer<TPriority>.Default.Compare(node.Priority, minChild.Priority) <= 0) 916if (comparer == Comparer<TPriority>.Default) 930return comparer ?? Comparer<TPriority>.Default;
System\Collections\Generic\SortedDictionary.cs (1)
844this.keyComparer = keyComparer ?? Comparer<TKey>.Default;
System\Collections\Generic\SortedList.cs (2)
78comparer = Comparer<TKey>.Default; 93comparer = Comparer<TKey>.Default;
System\Collections\Generic\SortedSet.cs (3)
73comparer = Comparer<T>.Default; 78this.comparer = comparer ?? Comparer<T>.Default; 82public SortedSet(IEnumerable<T> collection) : this(collection, Comparer<T>.Default) { }
System\Collections\Generic\SortedSetEqualityComparer.cs (1)
26_comparer = comparer ?? Comparer<T>.Default;
System\Collections\StructuralComparisons.cs (1)
74return Comparer<object>.Default.Compare(x, y);
System.Collections.Immutable (28)
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (2)
49if (Comparer<TKey>.Default.Compare(key, _max) <= 0) 54int c = Comparer<TKey>.Default.Compare(key, keys[i]);
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (2)
44if (Comparer<T>.Default.Compare(item, _max) <= 0) 49int c = Comparer<T>.Default.Compare(item, items[i]);
System\Collections\Immutable\ImmutableArray_1.Builder.cs (1)
949Array.Sort(_elements, 0, this.Count, Comparer<T>.Default);
System\Collections\Immutable\ImmutableArray_1.cs (2)
789return self.Sort(0, self.Length, Comparer<T>.Default); 835comparer ??= Comparer<T>.Default;
System\Collections\Immutable\ImmutableList_1.Builder.cs (2)
894/// elements, or null to use <see cref="Comparer{T}.Default"/>. 913/// elements, or null to use <see cref="Comparer{T}.Default"/>.
System\Collections\Immutable\ImmutableList_1.cs (7)
65/// The default comparer <see cref="Comparer{T}.Default"/> cannot 78/// elements.-or-null to use the default comparer <see cref="Comparer{T}.Default"/>. 87/// <paramref name="comparer"/> is null, and the default comparer <see cref="Comparer{T}.Default"/> 103/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>. 120/// <paramref name="comparer"/> is null, and the default comparer <see cref="Comparer{T}.Default"/> 451/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>. 468/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>.
System\Collections\Immutable\ImmutableList_1.Node.cs (6)
562internal Node Sort() => this.Sort(Comparer<T>.Default); 589/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>. 606/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>. 632/// elements, or null to use the default comparer <see cref="Comparer{T}.Default"/>. 647/// <paramref name="comparer"/> is null, and the default comparer <see cref="Comparer{T}.Default"/> 655comparer ??= Comparer<T>.Default;
System\Collections\Immutable\ImmutableSortedDictionary_2.Builder.cs (1)
39private IComparer<TKey> _keyComparer = Comparer<TKey>.Default;
System\Collections\Immutable\ImmutableSortedDictionary_2.cs (2)
53_keyComparer = keyComparer ?? Comparer<TKey>.Default; 323keyComparer ??= Comparer<TKey>.Default;
System\Collections\Immutable\ImmutableSortedSet_1.Builder.cs (1)
41private IComparer<T> _comparer = Comparer<T>.Default;
System\Collections\Immutable\ImmutableSortedSet_1.cs (2)
58_comparer = comparer ?? Comparer<T>.Default; 349comparer ??= Comparer<T>.Default;
System.Data.Common (1)
System\Data\EnumerableRowCollection.cs (1)
289AddSortExpression<TKey>(keySelector, Comparer<TKey>.Default, isDescending, isOrderBy);
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\InstrumentAdvice.cs (1)
59Comparer<T> comparer = Comparer<T>.Default;
System.IO.Packaging (1)
System\IO\Packaging\Package.cs (1)
406var uriComparer = Comparer<PackUriHelper.ValidatedPartUri>.Default;
System.Linq (61)
System\Linq\Max.cs (21)
330comparer ??= Comparer<TSource>.Default; 333if (typeof(TSource) == typeof(byte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<byte, MaxCalc<byte>>((IEnumerable<byte>)source); 334if (typeof(TSource) == typeof(sbyte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<sbyte, MaxCalc<sbyte>>((IEnumerable<sbyte>)source); 335if (typeof(TSource) == typeof(ushort) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ushort, MaxCalc<ushort>>((IEnumerable<ushort>)source); 336if (typeof(TSource) == typeof(short) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<short, MaxCalc<short>>((IEnumerable<short>)source); 337if (typeof(TSource) == typeof(char) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<char, MaxCalc<char>>((IEnumerable<char>)source); 338if (typeof(TSource) == typeof(uint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<uint, MaxCalc<uint>>((IEnumerable<uint>)source); 339if (typeof(TSource) == typeof(int) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<int, MaxCalc<int>>((IEnumerable<int>)source); 340if (typeof(TSource) == typeof(ulong) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ulong, MaxCalc<ulong>>((IEnumerable<ulong>)source); 341if (typeof(TSource) == typeof(long) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<long, MaxCalc<long>>((IEnumerable<long>)source); 342if (typeof(TSource) == typeof(nuint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nuint, MaxCalc<nuint>>((IEnumerable<nuint>)source); 343if (typeof(TSource) == typeof(nint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nint, MaxCalc<nint>>((IEnumerable<nint>)source); 344if (typeof(TSource) == typeof(Int128) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<Int128, MaxCalc<Int128>>((IEnumerable<Int128>)source); 345if (typeof(TSource) == typeof(UInt128) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<UInt128, MaxCalc<UInt128>>((IEnumerable<UInt128>)source); 380if (comparer == Comparer<TSource>.Default) 385if (Comparer<TSource>.Default.Compare(next, value) > 0) 445comparer ??= Comparer<TKey>.Default; 497if (comparer == Comparer<TKey>.Default) 503if (Comparer<TKey>.Default.Compare(nextKey, key) > 0) 852Comparer<TResult> comparer = Comparer<TResult>.Default; 873if (Comparer<TResult>.Default.Compare(x, value) > 0)
System\Linq\Min.cs (21)
308comparer ??= Comparer<TSource>.Default; 311if (typeof(TSource) == typeof(byte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<byte, MinCalc<byte>>((IEnumerable<byte>)source); 312if (typeof(TSource) == typeof(sbyte) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<sbyte, MinCalc<sbyte>>((IEnumerable<sbyte>)source); 313if (typeof(TSource) == typeof(ushort) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ushort, MinCalc<ushort>>((IEnumerable<ushort>)source); 314if (typeof(TSource) == typeof(short) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<short, MinCalc<short>>((IEnumerable<short>)source); 315if (typeof(TSource) == typeof(char) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<char, MinCalc<char>>((IEnumerable<char>)source); 316if (typeof(TSource) == typeof(uint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<uint, MinCalc<uint>>((IEnumerable<uint>)source); 317if (typeof(TSource) == typeof(int) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<int, MinCalc<int>>((IEnumerable<int>)source); 318if (typeof(TSource) == typeof(ulong) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<ulong, MinCalc<ulong>>((IEnumerable<ulong>)source); 319if (typeof(TSource) == typeof(long) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<long, MinCalc<long>>((IEnumerable<long>)source); 320if (typeof(TSource) == typeof(nuint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nuint, MinCalc<nuint>>((IEnumerable<nuint>)source); 321if (typeof(TSource) == typeof(nint) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<nint, MinCalc<nint>>((IEnumerable<nint>)source); 322if (typeof(TSource) == typeof(Int128) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<Int128, MinCalc<Int128>>((IEnumerable<Int128>)source); 323if (typeof(TSource) == typeof(UInt128) && comparer == Comparer<TSource>.Default) return (TSource)(object)MinMaxInteger<UInt128, MinCalc<UInt128>>((IEnumerable<UInt128>)source); 358if (comparer == Comparer<TSource>.Default) 363if (Comparer<TSource>.Default.Compare(next, value) < 0) 423comparer ??= Comparer<TKey>.Default; 475if (comparer == Comparer<TKey>.Default) 481if (Comparer<TKey>.Default.Compare(nextKey, key) < 0) 815Comparer<TResult> comparer = Comparer<TResult>.Default; 836if (Comparer<TResult>.Default.Compare(x, value) < 0)
System\Linq\OrderBy.cs (6)
24/// This method compares elements by using the default comparer <see cref="Comparer{T}.Default"/>. 43/// If comparer is <see langword="null"/>, the default comparer <see cref="Comparer{T}.Default"/> is used to compare elements. 46TypeIsImplicitlyStable<T>() && (comparer is null || comparer == Comparer<T>.Default) ? 69/// This method compares elements by using the default comparer <see cref="Comparer{T}.Default"/>. 88/// If comparer is <see langword="null"/>, the default comparer <see cref="Comparer{T}.Default"/> is used to compare elements. 91TypeIsImplicitlyStable<T>() && (comparer is null || comparer == Comparer<T>.Default) ?
System\Linq\OrderedEnumerable.cs (11)
89_comparer = comparer ?? Comparer<TKey>.Default; 101if (typeof(TKey) == typeof(string) && comparer == Comparer<string>.Default) 189new CachingComparer<TElement, TElement>(EnumerableSorter<TElement>.IdentityFunc, Comparer<TElement>.Default, _descending) : 190new CachingComparerWithChild<TElement, TElement>(EnumerableSorter<TElement>.IdentityFunc, Comparer<TElement>.Default, _descending, childComparer); 193new EnumerableSorter<TElement, TElement>(EnumerableSorter<TElement>.IdentityFunc, Comparer<TElement>.Default, _descending, next); 240span.Sort(static (a, b) => Comparer<TElement>.Default.Compare(b, a)); 449Debug.Assert(_comparer == Comparer<TKey>.Default); 456int c = Comparer<TKey>.Default.Compare(keys[index1], keys[index2]); 465Debug.Assert(_comparer == Comparer<TKey>.Default); 472int c = Comparer<TKey>.Default.Compare(keys[index2], keys[index1]); 484if (typeof(TKey).IsValueType && _next is null && _comparer == Comparer<TKey>.Default)
System\Linq\OrderedEnumerable.SpeedOpt.cs (2)
414if (Comparer<TElement>.Default.Compare(nextValue, resultValue) < 0) 425if (Comparer<TElement>.Default.Compare(nextValue, resultValue) >= 0)
System.Linq.Parallel (2)
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (1)
160return CreateComparer(Comparer<bool>.Default, comparer);
System\Linq\Parallel\Utils\Util.cs (1)
59return Comparer<TKey>.Default;
System.Private.CoreLib (54)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (6)
25comparer ??= Comparer<T>.Default; 42comparer ??= Comparer<T>.Default; 287if (comparer == null || comparer == Comparer<T>.Default) 331if (comparer == null || comparer == Comparer<T>.Default) 621IntrospectiveSort(keys, values, comparer ?? Comparer<TKey>.Default); 838if (comparer == null || comparer == Comparer<TKey>.Default)
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Comparer.cs (1)
97if (y.HasValue) return Comparer<T>.Default.Compare(x.value, y.value);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (1)
5658sortedChannels.Sort((p1, p2) => -Comparer<ulong>.Default.Compare(p1.Value.Keywords, p2.Value.Keywords));
src\libraries\System.Private.CoreLib\src\System\Nullable.cs (1)
83if (n2.HasValue) return Comparer<T>.Default.Compare(n1.value, n2.value);
src\libraries\System.Private.CoreLib\src\System\Tuple.cs (8)
140return CompareTo(obj, Comparer<object>.Default); 260return CompareTo(obj, Comparer<object>.Default); 385return CompareTo(obj, Comparer<object>.Default); 520return CompareTo(obj, Comparer<object>.Default); 665return CompareTo(obj, Comparer<object>.Default); 820return CompareTo(obj, Comparer<object>.Default); 985return ((IStructuralComparable)this).CompareTo(obj, Comparer<object>.Default); 1165return CompareTo(obj, Comparer<object>.Default);
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (37)
323return Comparer<T1>.Default.Compare(Item1, objTuple.Item1); 342return Comparer<T1>.Default.Compare(Item1, other.Item1); 533int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 536return Comparer<T2>.Default.Compare(Item2, other.Item2); 724int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 727c = Comparer<T2>.Default.Compare(Item2, other.Item2); 730return Comparer<T3>.Default.Compare(Item3, other.Item3); 931int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 934c = Comparer<T2>.Default.Compare(Item2, other.Item2); 937c = Comparer<T3>.Default.Compare(Item3, other.Item3); 940return Comparer<T4>.Default.Compare(Item4, other.Item4); 1156int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 1159c = Comparer<T2>.Default.Compare(Item2, other.Item2); 1162c = Comparer<T3>.Default.Compare(Item3, other.Item3); 1165c = Comparer<T4>.Default.Compare(Item4, other.Item4); 1168return Comparer<T5>.Default.Compare(Item5, other.Item5); 1399int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 1402c = Comparer<T2>.Default.Compare(Item2, other.Item2); 1405c = Comparer<T3>.Default.Compare(Item3, other.Item3); 1408c = Comparer<T4>.Default.Compare(Item4, other.Item4); 1411c = Comparer<T5>.Default.Compare(Item5, other.Item5); 1414return Comparer<T6>.Default.Compare(Item6, other.Item6); 1660int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 1663c = Comparer<T2>.Default.Compare(Item2, other.Item2); 1666c = Comparer<T3>.Default.Compare(Item3, other.Item3); 1669c = Comparer<T4>.Default.Compare(Item4, other.Item4); 1672c = Comparer<T5>.Default.Compare(Item5, other.Item5); 1675c = Comparer<T6>.Default.Compare(Item6, other.Item6); 1678return Comparer<T7>.Default.Compare(Item7, other.Item7); 1945int c = Comparer<T1>.Default.Compare(Item1, other.Item1); 1948c = Comparer<T2>.Default.Compare(Item2, other.Item2); 1951c = Comparer<T3>.Default.Compare(Item3, other.Item3); 1954c = Comparer<T4>.Default.Compare(Item4, other.Item4); 1957c = Comparer<T5>.Default.Compare(Item5, other.Item5); 1960c = Comparer<T6>.Default.Compare(Item6, other.Item6); 1963c = Comparer<T7>.Default.Compare(Item7, other.Item7); 1966return Comparer<TRest>.Default.Compare(Rest, other.Rest);
System.Threading.Channels (2)
System\Threading\Channels\Channel.netcoreapp.cs (2)
14/// <see cref="Comparer{T}.Default"/> is used to determine priority of elements. 26/// or <see cref="Comparer{T}.Default"/> if the provided comparer is null.
System.Windows.Forms (1)
System\Windows\Forms\Layout\TableLayout.SorterObjectArray.cs (1)
16comparer ??= Comparer<LayoutInfo>.Default;