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

PInvokeDelegateWrapperConstructor.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: 5fe9290213b2f6163991dbc1874cffeacfd11f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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 methods
    partial class PInvokeDelegateWrapperConstructor
    {
        protected override int ClassCode => 1000342011;

        protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
        {
            var owningType = (PInvokeDelegateWrapper)OwningType;
            var otherOwningType = (PInvokeDelegateWrapper)other.OwningType;
            return comparer.Compare(owningType.DelegateType, otherOwningType.DelegateType);
        }
    }
}