Welcome to mirror list, hosted at ThFree Co, Russian Federation.

RuntimeDeterminedType.Sorting.cs « RuntimeDetermined « TypeSystem « Common « tools « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5a1a2293a220e10e5082d93b31403c49ff95d79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Internal.TypeSystem
{
    // Functionality related to deterministic ordering of types
    public partial class RuntimeDeterminedType
    {
        protected internal override int ClassCode => 351938209;

        protected internal sealed override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
        {
            var otherType = (RuntimeDeterminedType)other;
            int result = comparer.Compare(_rawCanonType, otherType._rawCanonType);
            if (result != 0)
                return result;

            return comparer.Compare(_runtimeDeterminedDetailsType, otherType._runtimeDeterminedDetailsType);
        }
    }
}