3 interfaces inheriting from IComparable
Microsoft.ML.AutoML (1)
Sweepers\ISweeper.cs (1)
160internal interface IRunResult : IComparable<IRunResult>
Microsoft.ML.Sweeper (1)
ISweeper.cs (1)
189public interface IRunResult : IComparable<IRunResult>
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Numerics\INumber.cs (1)
13IComparable<TSelf>,
141 implementations of IComparable
Aspire.Dashboard (1)
Otlp\Storage\ApplicationKey.cs (1)
6public readonly record struct ApplicationKey(string Name, string? InstanceId) : IComparable<ApplicationKey>
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DirectionalAction.cs (1)
10internal class DirectionalAction : IComparable<DirectionalAction>
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\EndpointAddressProcessor.cs (1)
150internal class Attr : IComparable<Attr>
Shared\ProjectDependency.cs (1)
23internal class ProjectDependency : IComparable<ProjectDependency>
GenerateDocumentationAndConfigFiles (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
illink (3)
Metrics (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Metrics.Legacy (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.AspNetCore.App.Analyzers (2)
Infrastructure\VirtualChars\VirtualChar.cs (2)
25internal readonly struct VirtualChar : IEquatable<VirtualChar>, IComparable<VirtualChar>, IComparable<char>
Microsoft.AspNetCore.Routing (2)
Matching\HostMatcherPolicy.cs (1)
398private readonly struct EdgeKey : IEquatable<EdgeKey>, IComparable<EdgeKey>, IComparable
Matching\HttpMethodMatcherPolicy.cs (1)
441internal readonly struct EdgeKey : IEquatable<EdgeKey>, IComparable<EdgeKey>, IComparable
Microsoft.AspNetCore.Shared.Tests (1)
ClosedGenericMatcherTest.cs (1)
348private class DerivedClassWithComparable : DerivedClass, IComparable<DerivedClassWithComparable>
Microsoft.CodeAnalysis (6)
CodeGen\DebugId.cs (1)
19internal readonly record struct DebugId : IComparable<DebugId>
Desktop\AssemblyVersion.cs (1)
11internal readonly struct AssemblyVersion : IEquatable<AssemblyVersion>, IComparable<AssemblyVersion>
Syntax\AbstractWarningStateMap.cs (1)
64protected readonly struct WarningStateMapEntry : IComparable<WarningStateMapEntry>
Syntax\LineDirectiveMap.LineMappingEntry.cs (1)
58internal readonly struct LineMappingEntry : IComparable<LineMappingEntry>
Text\LinePosition.cs (1)
15public readonly struct LinePosition : IEquatable<LinePosition>, IComparable<LinePosition>
Text\TextSpan.cs (1)
16public readonly struct TextSpan : IEquatable<TextSpan>, IComparable<TextSpan>
Microsoft.CodeAnalysis.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Utilities\VirtualTreePoint.cs (1)
12internal readonly record struct VirtualTreePoint : IComparable<VirtualTreePoint>
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmClrMethodId.cs (1)
16public readonly struct DkmClrMethodId : IComparable<DkmClrMethodId>, IEquatable<DkmClrMethodId>
Microsoft.CodeAnalysis.Features (4)
Completion\CompletionItem.cs (1)
20public sealed class CompletionItem : IComparable<CompletionItem>
ExtractMethod\MethodExtractor.VariableInfo.cs (1)
25bool useAsReturnValue) : IComparable<VariableInfo>
ExtractMethod\MethodExtractor.VariableSymbol.cs (1)
20protected abstract class VariableSymbol : IComparable<VariableSymbol>
FullyQualify\AbstractFullyQualifyService.SymbolResult.cs (1)
14private readonly struct SymbolResult : IEquatable<SymbolResult>, IComparable<SymbolResult>
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Protocol\SemanticTokens\SemanticTokensEdit.cs (1)
19internal sealed class SemanticTokensEdit : IComparable<SemanticTokensEdit>
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Microsoft.CodeAnalysis.UnitTests (6)
Collections\HashSet\TestingTypes.cs (6)
47public class EquatableBackwardsOrder : IEquatable<EquatableBackwardsOrder?>, IComparable<EquatableBackwardsOrder>, IComparable 177public struct SimpleInt : IStructuralComparable, IStructuralEquatable, IComparable, IComparable<SimpleInt> 262public class GenericComparable : IComparable<GenericComparable> 287public class BadlyBehavingComparable : IComparable<BadlyBehavingComparable>, IComparable 294public class MutatingComparable : IComparable<MutatingComparable>, IComparable 319public readonly struct ValueComparable<T> : IComparable<ValueComparable<T>> where T : IComparable<T>
Microsoft.CodeAnalysis.Workspaces (9)
FindSymbols\ReferenceLocation.cs (1)
17public readonly record struct ReferenceLocation : IComparable<ReferenceLocation>
PatternMatching\PatternMatch.cs (1)
13internal readonly struct PatternMatch : IComparable<PatternMatch>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
SymbolSearch\ISymbolSearchService.cs (1)
111string version) : AbstractPackageResult(packageName, rank), IEquatable<PackageWithAssemblyResult?>, IComparable<PackageWithAssemblyResult?>
Workspace\Solution\Checksum.cs (1)
24[field: FieldOffset(8)][property: DataMember(Order = 1)] long Data2) : IComparable<Checksum>
Workspace\Solution\ProjectId.cs (1)
25public sealed class ProjectId : IEquatable<ProjectId>, IComparable<ProjectId>
Workspace\Solution\ProjectState.cs (1)
26internal sealed partial class ProjectState : IComparable<ProjectState>
Microsoft.DotNet.XUnitAssert.Tests (6)
EqualityAssertsTests.cs (6)
4404 class ComparableBaseClass : IComparable<ComparableBaseClass> 4428 class ComparableThrower : IComparable<ComparableThrower> 4509 class ImplicitIComparableExpected : IComparable<IntWrapper> 4521 class ExplicitIComparableActual : IComparable<IntWrapper> 4533 class IComparableActualThrower : IComparable<IntWrapper> 4580 class SpyComparable_Generic : IComparable<SpyComparable_Generic>
Microsoft.Maui.Graphics (1)
PaintGradientStop.cs (1)
5 public class PaintGradientStop : IComparable<PaintGradientStop>
Microsoft.ML.Core (2)
Utilities\HashArray.cs (1)
31private struct Entry : IComparable<Entry>
Utilities\SupervisedBinFinder.cs (1)
25private readonly struct ValuePair<T> : IComparable<ValuePair<T>>
Microsoft.ML.DataView (1)
DataViewRowId.cs (1)
18public readonly struct DataViewRowId : IComparable<DataViewRowId>, IEquatable<DataViewRowId>
Microsoft.ML.FastTree (2)
Training\Test.cs (1)
14internal sealed class TestResult : IComparable<TestResult>
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (1)
1099public struct SplitInfo : IComparable<SplitInfo>
Microsoft.ML.Tokenizers (4)
Model\CodeGenTokenizer.cs (1)
1802private struct SymbolPair : IEquatable<SymbolPair>, IComparable<SymbolPair>
Model\Merge.cs (1)
12internal struct Merge : IEquatable<Merge>, IComparable<Merge>
Model\Pair.cs (1)
11internal struct Pair<T> : IEquatable<Pair<T>>, IComparable<Pair<T>> where T : struct, IEquatable<T>, IComparable<T>
Model\SentencePieceBpeModel.cs (1)
1220private struct SymbolPair : IEquatable<SymbolPair>, IComparable<SymbolPair>
PresentationCore (2)
MS\Internal\Shaping\OpenTypeLayoutCache.cs (1)
1083private class GlyphLookupRecord : IComparable<GlyphLookupRecord>
MS\Internal\TextFormatting\TextStore.cs (1)
562private struct TextEffectBoundary : IComparable<TextEffectBoundary>
Roslyn.Diagnostics.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
RunTests (1)
AssemblyInfo.cs (1)
11public readonly record struct AssemblyInfo(string AssemblyPath) : IComparable<AssemblyInfo>
System.IO.Packaging (3)
System\IO\Packaging\InterleavedZipPackagePartStream.PieceDirectory.cs (1)
70private sealed class PieceStreamInfo : IComparable<PieceStreamInfo>
System\IO\Packaging\PackUriHelper.cs (1)
605internal sealed class ValidatedPartUri : Uri, IComparable<ValidatedPartUri>, IEquatable<ValidatedPartUri>
System\IO\Packaging\ZipPackagePartPiece.cs (1)
12internal sealed class ZipPackagePartPiece : IComparable<ZipPackagePartPiece>
System.Private.CoreLib (35)
src\libraries\System.Private.CoreLib\src\System\Boolean.cs (1)
19IComparable<bool>,
src\libraries\System.Private.CoreLib\src\System\Byte.cs (1)
20IComparable<byte>,
src\libraries\System.Private.CoreLib\src\System\Char.cs (1)
24IComparable<char>,
src\libraries\System.Private.CoreLib\src\System\DateOnly.cs (1)
18IComparable<DateOnly>,
src\libraries\System.Private.CoreLib\src\System\DateTime.cs (1)
53IComparable<DateTime>,
src\libraries\System.Private.CoreLib\src\System\DateTimeOffset.cs (1)
41IComparable<DateTimeOffset>,
src\libraries\System.Private.CoreLib\src\System\Decimal.cs (1)
66IComparable<decimal>,
src\libraries\System.Private.CoreLib\src\System\Double.cs (1)
25IComparable<double>,
src\libraries\System.Private.CoreLib\src\System\Guid.cs (1)
27IComparable<Guid>,
src\libraries\System.Private.CoreLib\src\System\Half.cs (1)
23IComparable<Half>,
src\libraries\System.Private.CoreLib\src\System\Int16.cs (1)
22IComparable<short>,
src\libraries\System.Private.CoreLib\src\System\Int32.cs (1)
22IComparable<int>,
src\libraries\System.Private.CoreLib\src\System\Int64.cs (1)
22IComparable<long>,
src\libraries\System.Private.CoreLib\src\System\IntPtr.cs (1)
30IComparable<nint>,
src\libraries\System.Private.CoreLib\src\System\SByte.cs (1)
22IComparable<sbyte>,
src\libraries\System.Private.CoreLib\src\System\Single.cs (1)
25IComparable<float>,
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.BinarySearch.cs (1)
62internal readonly ref struct ComparerComparable<T, TComparer> : IComparable<T>
src\libraries\System.Private.CoreLib\src\System\String.cs (1)
31IComparable<string?>,
src\libraries\System.Private.CoreLib\src\System\Text\Rune.cs (1)
30readonly struct Rune : IComparable, IComparable<Rune>, IEquatable<Rune>
src\libraries\System.Private.CoreLib\src\System\TimeOnly.cs (1)
17IComparable<TimeOnly>,
src\libraries\System.Private.CoreLib\src\System\TimeSpan.cs (1)
31IComparable<TimeSpan>,
src\libraries\System.Private.CoreLib\src\System\UInt16.cs (1)
22IComparable<ushort>,
src\libraries\System.Private.CoreLib\src\System\UInt32.cs (1)
22IComparable<uint>,
src\libraries\System.Private.CoreLib\src\System\UInt64.cs (1)
22IComparable<ulong>,
src\libraries\System.Private.CoreLib\src\System\UIntPtr.cs (1)
30IComparable<nuint>,
src\libraries\System.Private.CoreLib\src\System\ValueTuple.cs (9)
35: IEquatable<ValueTuple>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple>, IValueTupleInternal, ITuple 264: IEquatable<ValueTuple<T1>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1>>, IValueTupleInternal, ITuple 428: IEquatable<ValueTuple<T1, T2>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2>>, IValueTupleInternal, ITuple 630: IEquatable<ValueTuple<T1, T2, T3>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3>>, IValueTupleInternal, ITuple 829: IEquatable<ValueTuple<T1, T2, T3, T4>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4>>, IValueTupleInternal, ITuple 1046: IEquatable<ValueTuple<T1, T2, T3, T4, T5>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5>>, IValueTupleInternal, ITuple 1281: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6>>, IValueTupleInternal, ITuple 1534: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7>>, IValueTupleInternal, ITuple 1805: IEquatable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IStructuralEquatable, IStructuralComparable, IComparable, IComparable<ValueTuple<T1, T2, T3, T4, T5, T6, T7, TRest>>, IValueTupleInternal, ITuple
src\libraries\System.Private.CoreLib\src\System\Version.cs (1)
22public sealed class Version : ICloneable, IComparable, IComparable<Version?>, IEquatable<Version?>, ISpanFormattable, IUtf8SpanFormattable, IUtf8SpanParsable<Version>
System.Reflection.Metadata (1)
System\Reflection\Metadata\Ecma335\MetadataAggregator.cs (1)
19internal struct RowCounts : IComparable<RowCounts>
System.Runtime.Numerics (1)
System\Numerics\BigInteger.cs (1)
20IComparable<BigInteger>,
System.Security.Principal.Windows (1)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (1)
72public sealed partial class SecurityIdentifier : System.Security.Principal.IdentityReference, System.IComparable<System.Security.Principal.SecurityIdentifier>
System.Text.RegularExpressions (2)
System\Text\RegularExpressions\Symbolic\BDD.cs (1)
22internal sealed class BDD : IComparable<BDD>, IEquatable<BDD>
System\Text\RegularExpressions\Symbolic\BitVector.cs (1)
16internal struct BitVector : IComparable<BitVector>, IEquatable<BitVector>
Test.Utilities (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
Text.Analyzers (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\VirtualChar.cs (2)
26internal readonly record struct VirtualChar : IComparable<VirtualChar>, IComparable<char>
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (1)
19internal readonly record struct TokenData : IComparable<TokenData>
273 references to IComparable
Aspire.Confluent.Kafka (1)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\Shared\Guard.cs (1)
188where T : IComparable<T>
Aspire.Microsoft.Data.SqlClient (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
186where T : IComparable<T>
Aspire.Microsoft.EntityFrameworkCore.SqlServer (1)
src\Vendoring\OpenTelemetry.Instrumentation.SqlClient\Shared\Guard.cs (1)
186where T : IComparable<T>
Aspire.StackExchange.Redis (1)
src\Vendoring\OpenTelemetry.Instrumentation.StackExchangeRedis\Shared\Guard.cs (1)
194where T : IComparable<T>
GenerateDocumentationAndConfigFiles (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
859public static IOrderedEnumerable<T> Order<T>(IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Metrics (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Metrics.Legacy (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.Arcade.Test.Common (2)
AssertEx.cs (2)
75var comparableT = x as IComparable<T>;
Microsoft.AspNetCore.Cryptography.KeyDerivation (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.AspNetCore.DataProtection.Abstractions (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.AspNetCore.Http.Connections (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.AspNetCore.Http.Connections.Client (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.AspNetCore.Shared.Tests (6)
ClosedGenericMatcherTest.cs (2)
103typeof(IComparable<>), 104typeof(IComparable<DerivedClassWithComparable>)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.AspNetCore.WebUtilities (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.Build.Framework (2)
ArraySortHelper.cs (2)
290where T : IComparable<T> 893where TKey : IComparable<TKey>
Microsoft.CodeAnalysis (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
859public static IOrderedEnumerable<T> Order<T>(IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Analyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Collections.Package (3)
Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Extensions.Package (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Features (3)
Completion\CompletionItem.cs (1)
509int IComparable<CompletionItem>.CompareTo([AllowNull] CompletionItem other)
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (2)
61var comparableType = compilation.GetTypeByMetadataName(typeof(IComparable<>).FullName!); 122foreach (var member in comparableType.GetMembers(nameof(IComparable<>.CompareTo)))
Microsoft.CodeAnalysis.InteractiveHost (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Test.Utilities (1)
Assert\AssertEx.cs (1)
85if (x is IComparable<T> comparableT)
Microsoft.CodeAnalysis.Threading.Package (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.UnitTests (3)
Collections\HashSet\TestingTypes.cs (2)
313public static ValueComparable<T> Create<T>(T value) where T : IComparable<T> 319public readonly struct ValueComparable<T> : IComparable<ValueComparable<T>> where T : IComparable<T>
Collections\ImmutableDictionaryTestBase.nonnetstandard.cs (1)
125private static IImmutableDictionary<TKey, TValue> AddTestHelper<TKey, TValue>(IImmutableDictionary<TKey, TValue> map, TKey key, TValue value) where TKey : IComparable<TKey>
Microsoft.CodeAnalysis.Workspaces (4)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
859public static IOrderedEnumerable<T> Order<T>(IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Workspace\Solution\ProjectId.cs (1)
119int IComparable<ProjectId>.CompareTo(ProjectId? other)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Microsoft.DotNet.NuGetRepack.Tests (2)
TestHelpers\AssertEx.cs (2)
75var comparableT = x as IComparable<T>;
Microsoft.DotNet.XUnitAssert.Tests (5)
EqualityAssertsTests.cs (5)
424 Assert.Equal(expected, (IComparable<ComparableThrower>)actual); 448 assertFailure(() => Assert.Equal(expected, (IComparable<ComparableThrower>)actual)); 2759 assertFailure(() => Assert.NotEqual(expected, (IComparable<ComparableThrower>)actual)); 2770 Assert.NotEqual(expected, (IComparable<ComparableThrower>)actual); 4530 int IComparable<IntWrapper>.CompareTo(IntWrapper? other) => Value.CompareTo(other!.Value);
Microsoft.Extensions.Features (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.Extensions.Identity.Core (4)
src\Shared\ThrowHelpers\ArgumentOutOfRangeThrowHelper.cs (4)
121where T : IComparable<T> 138where T : IComparable<T> 155where T : IComparable<T> 172where T : IComparable<T>
Microsoft.Maui (1)
Graphics\CompareExtensions.cs (1)
7 public static T Clamp<T>(this T value, T min, T max) where T : IComparable<T>
Microsoft.ML.AutoML (1)
Sweepers\ISweeper.cs (1)
168where T : IComparable<T>
Microsoft.ML.Core (2)
Utilities\HashArray.cs (1)
25where TItem : IEquatable<TItem>, IComparable<TItem>
Utilities\SupervisedBinFinder.cs (1)
26where T : IComparable<T>
Microsoft.ML.Data (8)
Deprecated\Vector\GenericSpanSortHelper.cs (1)
46where TKey : IComparable<TKey>
Transforms\NormalizeColumnSng.cs (3)
540internal abstract class HeapBase<TType> where TType : IComparable<TType> 607internal sealed class MaxHeap<TType> : HeapBase<TType> where TType : IComparable<TType> 650internal sealed class MinHeap<TType> : HeapBase<TType> where TType : IComparable<TType>
Transforms\ValueToKeyMappingTransformerImpl.cs (4)
61where T : IEquatable<T>, IComparable<T> 144where T : IEquatable<T>, IComparable<T> 544where T : IEquatable<T>, IComparable<T> 678where T : IEquatable<T>, IComparable<T>
Microsoft.ML.FastTree (11)
Utils\LinqExtensions.cs (11)
13public static int ArgMin<T>(this T[] arr) where T : IComparable<T> 26public static int ArgMax<T>(this ReadOnlySpan<T> span) where T : IComparable<T> 39public static int ArgMin<T>(this T[] arr, int prefix) where T : IComparable<T> 53public static int ArgMax<T>(this T[] arr, int prefix) where T : IComparable<T> 67public static int ArgMax<T>(this IEnumerable<T> e) where T : IComparable<T> 84public static int ArgMaxRand<T>(this IEnumerable<T> e, Random rnd, double fraction) where T : IComparable<T> 101public static int ArgMax<T>(this IEnumerable<T> e, int prefix) where T : IComparable<T> 124public static int ArgMaxRand<T>(this IEnumerable<T> e, int prefix, Random rnd, double fraction) where T : IComparable<T> 147public static int ArgMin<T>(this IEnumerable<T> e) where T : IComparable<T> 164public static int ArgMin<T>(this IEnumerable<T> e, int prefix) where T : IComparable<T> 218public static IEnumerable<T> MergeSortedList<T>(this IEnumerable<T> s1, IEnumerable<T> s2) where T : IComparable<T>
Microsoft.ML.Sweeper (1)
ISweeper.cs (1)
197where T : IComparable<T>
Microsoft.ML.Tokenizers (2)
Model\Pair.cs (1)
11internal struct Pair<T> : IEquatable<Pair<T>>, IComparable<Pair<T>> where T : struct, IEquatable<T>, IComparable<T>
Utils\PriorityQueue.cs (1)
11internal class PriorityQueue<T> where T : IComparable<T>
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
291[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable<>))]
netstandard (1)
netstandard.cs (1)
866[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable<>))]
Roslyn.Diagnostics.Analyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
System.Collections.Immutable (27)
System\Collections\Frozen\Constants.cs (3)
35/// Whether the <typeparamref name="T"/> is known to implement <see cref="IComparable{T}"/> safely and efficiently, 39/// This does not automatically return true for any type that implements <see cref="IComparable{T}"/>. 41/// container implements <see cref="IComparable{T}"/> to delegate to its contained items' implementation
System\Collections\Frozen\SmallValueTypeComparableFrozenDictionary.cs (3)
13/// While not constrained in this manner, the <typeparamref name="TKey"/> must be an <see cref="IComparable{T}"/>. 14/// This implementation is only used for a set of types that have a known-good <see cref="IComparable{T}"/> implementation; it's not 15/// used for an <see cref="IComparable{T}"/> as we can't know for sure whether it's valid, e.g. if the TKey is a ValueTuple`2, it itself
System\Collections\Frozen\SmallValueTypeComparableFrozenSet.cs (4)
13/// While not constrained in this manner, the <typeparamref name="T"/> must be an <see cref="IComparable{T}"/>. 14/// This implementation is only used for a set of types that have a known-good <see cref="IComparable{T}"/> implementation; it's not 15/// used for an <see cref="IComparable{T}"/> as we can't know for sure whether it's valid, e.g. if the T is a ValueTuple`2, it itself 25Debug.Assert(default(T) is IComparable<T>);
System\Collections\Immutable\ImmutableArray.cs (12)
454/// using the <see cref="IComparable{T}"/> generic interface implemented by each element 469/// <paramref name="value"/> does not implement the <see cref="IComparable{T}"/> generic interface, and 470/// the search encounters an element that does not implement the <see cref="IComparable{T}"/> 487/// elements; or null to use the <see cref="IComparable{T}"/> implementation of each 499/// <paramref name="comparer"/> is null, <paramref name="value"/> does not implement the <see cref="IComparable{T}"/> generic interface, and 500/// the search encounters an element that does not implement the <see cref="IComparable{T}"/> 510/// a value, using the <see cref="IComparable{T}"/> generic interface implemented by 527/// <paramref name="value"/> does not implement the <see cref="IComparable{T}"/> generic interface, and 528/// the search encounters an element that does not implement the <see cref="IComparable{T}"/> 554/// elements; or null to use the <see cref="IComparable{T}"/> implementation of each 566/// <paramref name="comparer"/> is null, <paramref name="value"/> does not implement the <see cref="IComparable{T}"/> generic 568/// <see cref="IComparable{T}"/> generic interface.
System\Collections\Immutable\ImmutableList_1.cs (3)
66/// find an implementation of the <see cref="IComparable{T}"/> generic interface or 88/// cannot find an implementation of the <see cref="IComparable{T}"/> generic interface 121/// cannot find an implementation of the <see cref="IComparable{T}"/> generic interface
System\Collections\Immutable\ImmutableList_1.Node.cs (1)
648/// cannot find an implementation of the <see cref="IComparable{T}"/> generic interface
System\Collections\Immutable\SortedInt32KeyNode.cs (1)
18/// and then an interface call to <see cref="int"/>'s <see cref="IComparable{T}.CompareTo"/> method as part of
System.Configuration.ConfigurationManager (3)
System\Configuration\ValidatorUtils.cs (3)
20where T : IComparable<T> 29private static void ValidateRangeImpl<T>(T value, T min, T max, bool exclusiveRange) where T : IComparable<T> 31IComparable<T> itfValue = value;
System.IO.Packaging (4)
System\IO\Packaging\InterleavedZipPackagePartStream.PieceDirectory.cs (1)
98int IComparable<PieceStreamInfo>.CompareTo(PieceStreamInfo? pieceStreamInfo)
System\IO\Packaging\PackUriHelper.cs (2)
152return ((IComparable<ValidatedPartUri>)firstPartUri).CompareTo((ValidatedPartUri)secondPartUri); 640int IComparable<ValidatedPartUri>.CompareTo(ValidatedPartUri? otherPartUri)
System\IO\Packaging\ZipPackagePartPiece.cs (1)
183int IComparable<ZipPackagePartPiece>.CompareTo(ZipPackagePartPiece? other)
System.Linq (8)
System\Linq\Max.cs (4)
307/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 309/// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Max{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para> 403/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 417/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\Min.cs (4)
286/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 288/// <para>If type <typeparamref name="TSource" /> implements <see cref="System.IComparable{T}" />, the <see cref="Min{T}(IEnumerable{T})" /> method uses that implementation to compare values. Otherwise, if type <typeparamref name="TSource" /> implements <see cref="System.IComparable" />, that implementation is used to compare values.</para> 382/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="System.IComparable{TKey}" /> interface.</exception> 396/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Linq.AsyncEnumerable (8)
System\Linq\MaxAsync.cs (2)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface (via the returned task).</exception> 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>
System\Linq\MaxByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System\Linq\MinAsync.cs (2)
19/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{T}" /> interface.</exception> 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>
System\Linq\MinByAsync.cs (2)
21/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 131/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Linq.Queryable (7)
System\Linq\Queryable.cs (7)
2319/// <exception cref="ArgumentException">No object in <paramref name="source" /> implements the <see cref="System.IComparable" /> or <see cref="System.IComparable{T}" /> interface.</exception> 2353/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2376/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 2403/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2470/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception> 2493/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TSource}" /> interface.</exception> 2520/// <exception cref="ArgumentException">No key extracted from <paramref name="source" /> implements the <see cref="IComparable" /> or <see cref="IComparable{TKey}" /> interface.</exception>
System.Private.CoreLib (56)
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (4)
181where T : IComparable<T> 192where T : IComparable<T> 203where T : IComparable<T> 214where T : IComparable<T>
src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
1338static int GenericBinarySearch<T>(Array array, int adjustedIndex, int length, object value) where T : struct, IComparable<T>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs (2)
277where T : IComparable<T> 830where TKey : IComparable<TKey>
src\libraries\System.Private.CoreLib\src\System\Collections\Generic\Comparer.cs (2)
55public sealed partial class GenericComparer<T> : Comparer<T> where T : IComparable<T>? 86if (!typeof(T).IsAssignableTo(typeof(IComparable<T>)))
src\libraries\System.Private.CoreLib\src\System\Enum.cs (2)
527where TStorage : struct, IEquatable<TStorage>, IComparable<TStorage> 2280internal static bool AreSorted<TStorage>(TStorage[] values) where TStorage : struct, IComparable<TStorage>
src\libraries\System.Private.CoreLib\src\System\Int128.cs (1)
65/// <inheritdoc cref="IComparable{T}.CompareTo(T)" />
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (33)
439public static bool ContainsAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 445public static bool ContainsAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 677public static bool ContainsAnyInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 691public static bool ContainsAnyExceptInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 1895public static int IndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 1908public static int IndexOfAnyInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> 1960public static int IndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 1973public static int IndexOfAnyExceptInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> 2025public static int LastIndexOfAnyInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 2038public static int LastIndexOfAnyInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> 2090public static int LastIndexOfAnyExceptInRange<T>(this Span<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> => 2103public static int LastIndexOfAnyExceptInRange<T>(this ReadOnlySpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T> 2173public static int SequenceCompareTo<T>(this Span<T> span, ReadOnlySpan<T> other) where T : IComparable<T>? => 3505public static int SequenceCompareTo<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> other) where T : IComparable<T>? 4138/// using the specified <see cref="IComparable{T}"/> generic interface. 4142/// <param name="comparable">The <see cref="IComparable{T}"/> to use when comparing.</param> 4154public static int BinarySearch<T>(this Span<T> span, IComparable<T> comparable) => 4162/// <typeparam name="TComparable">The specific type of <see cref="IComparable{T}"/>.</typeparam> 4178where TComparable : IComparable<T>, allows ref struct => 4208/// using the specified <see cref="IComparable{T}"/> generic interface. 4212/// <param name="comparable">The <see cref="IComparable{T}"/> to use when comparing.</param> 4224this ReadOnlySpan<T> span, IComparable<T> comparable) => 4225BinarySearch<T, IComparable<T>>(span, comparable); 4232/// <typeparam name="TComparable">The specific type of <see cref="IComparable{T}"/>.</typeparam> 4247where TComparable : IComparable<T>, allows ref struct 4284/// Sorts the elements in the entire <see cref="Span{T}" /> using the <see cref="IComparable{T}" /> implementation 4290/// One or more elements in <paramref name="span"/> do not implement the <see cref="IComparable{T}" /> interface. 4303/// use the <see cref="IComparable{T}"/> interface implementation of each element. 4307/// implement the <see cref="IComparable{T}" /> interface. 4340/// based on the keys in the first <see cref="Span{TKey}" /> using the <see cref="IComparable{T}" /> 4351/// One or more elements in <paramref name="keys"/> do not implement the <see cref="IComparable{T}" /> interface. 4367/// use the <see cref="IComparable{T}"/> interface implementation of each element. 4374/// implement the <see cref="IComparable{T}" /> interface.
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.BinarySearch.cs (2)
15where TComparable : IComparable<T>, allows ref struct 25where TComparable : IComparable<T>, allows ref struct
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.T.cs (5)
1287where T : IComparable<T>? 3439where T : IComparable<T> 3454where T : IComparable<T> 3605where T : IComparable<T> 3620where T : IComparable<T>
src\libraries\System.Private.CoreLib\src\System\UInt128.cs (1)
67/// <inheritdoc cref="IComparable{T}.CompareTo(T)" />
src\System\Collections\Generic\ArraySortHelper.CoreCLR.cs (2)
26if (typeof(IComparable<T>).IsAssignableFrom(typeof(T))) 59if (typeof(IComparable<TKey>).IsAssignableFrom(typeof(TKey)))
src\System\Collections\Generic\ComparerHelpers.cs (1)
36if (typeof(IComparable<>).MakeGenericType(type).IsAssignableFrom(type))
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
269[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IComparable<>))]
System.Text.Json (1)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
70where TKey : unmanaged, IComparable<TKey>
System.Text.Json.SourceGeneration (1)
src\libraries\System.Text.Json\Common\JsonHelpers.cs (1)
70where TKey : unmanaged, IComparable<TKey>
System.Text.RegularExpressions (8)
System\Text\RegularExpressions\Symbolic\MatchingState.cs (1)
11internal sealed class MatchingState<TSet> where TSet : IComparable<TSet>, IEquatable<TSet>
System\Text\RegularExpressions\Symbolic\MatchReversal.cs (1)
9internal readonly struct MatchReversalInfo<TSet> where TSet : IComparable<TSet>, IEquatable<TSet>
System\Text\RegularExpressions\Symbolic\MintermGenerator.cs (1)
17internal static class MintermGenerator<TSet> where TSet : IComparable<TSet>
System\Text\RegularExpressions\Symbolic\SymbolicRegexBuilder.cs (2)
17internal sealed class SymbolicRegexBuilder<TSet> where TSet : IComparable<TSet>, IEquatable<TSet> 284where TNewSet : IComparable<TNewSet>, IEquatable<TNewSet>
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (1)
30internal sealed partial class SymbolicRegexMatcher<TSet> : SymbolicRegexMatcher where TSet : IComparable<TSet>, IEquatable<TSet>
System\Text\RegularExpressions\Symbolic\SymbolicRegexNode.cs (1)
13internal sealed class SymbolicRegexNode<TSet> where TSet : IComparable<TSet>, IEquatable<TSet>
System\Text\RegularExpressions\Symbolic\SymbolicRegexRunnerFactory.cs (1)
58private sealed class Runner<TSet> : RegexRunner where TSet : IComparable<TSet>, IEquatable<TSet>
Test.Utilities (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
859public static IOrderedEnumerable<T> Order<T>(IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
Text.Analyzers (3)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
861public static IOrderedEnumerable<T> Order<T>(this IEnumerable<T> source) where T : IComparable<T>
src\Dependencies\Collections\Internal\ArraySortHelper.cs (2)
295where T : IComparable<T> 895where TKey : IComparable<TKey>
xunit.assert (4)
Sdk\AssertEqualityComparer.cs (2)
259 var comparableGeneric = x as IComparable<T>;
Sdk\AssertRangeComparer.cs (2)
51 var comparable1 = x as IComparable<T>;