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

FieldForInstantiatedType.Sorting.cs « Sorting « TypeSystem « Common « tools « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1682d6abe97a6e867b99a70eff2d88ec7ab50671 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// 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 and members
    partial class FieldForInstantiatedType
    {
        protected internal override int ClassCode => 1140200283;

        protected internal override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer)
        {
            var otherField = (FieldForInstantiatedType)other;

            int result = comparer.CompareWithinClass(_instantiatedType, otherField._instantiatedType);
            if (result != 0)
                return result;

            return comparer.Compare(_fieldDef, otherField._fieldDef);
        }
    }
}