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

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

using Internal.TypeSystem;

namespace Internal.IL.Stubs
{
    // Functionality related to deterministic ordering of methods
    public partial class DelegateMarshallingMethodThunk
    {
        protected override int ClassCode => 1018037605;

        protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
        {
            var otherMethod = (DelegateMarshallingMethodThunk)other;
            int result = (int)Kind - (int)otherMethod.Kind;
            if (result != 0)
                return result;

            return comparer.Compare(_delegateType, otherMethod._delegateType);
        }
    }
}