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

NativeStructType.Sorting.cs « IL « Interop « TypeSystem « Common « tools « coreclr « src - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e66dc55d975c01863ce7ca68cb944f72de67c6e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 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.Interop
{
    // Functionality related to deterministic ordering of types
    partial class NativeStructType
    {
        protected override int ClassCode => -377751537;

        protected override int CompareToImpl(TypeDesc other, TypeSystemComparer comparer)
        {
            return comparer.Compare(ManagedStructType, ((NativeStructType)other).ManagedStructType);
        }

        partial class NativeStructField
        {
            protected override int ClassCode => 1580219745;

            protected override int CompareToImpl(FieldDesc other, TypeSystemComparer comparer)
            {
                return comparer.Compare(_managedField, ((NativeStructField)other)._managedField);
            }
        }
    }
}