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

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs')
-rw-r--r--src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs b/src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs
index 78e29e25e..46f364cd9 100644
--- a/src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs
+++ b/src/Common/src/TypeSystem/Interop/MethodDesc.Interop.cs
@@ -101,7 +101,7 @@ namespace Internal.TypeSystem
ThrowOnUnmappableCharMask = 12288
}
- public struct PInvokeFlags
+ public struct PInvokeFlags : IEquatable<PInvokeFlags>, IComparable<PInvokeFlags>
{
private PInvokeAttributes _attributes;
public PInvokeAttributes Attributes
@@ -279,7 +279,26 @@ namespace Internal.TypeSystem
}
}
}
-
+
+ public int CompareTo(PInvokeFlags other)
+ {
+ return Attributes.CompareTo(other.Attributes);
+ }
+
+ public bool Equals(PInvokeFlags other)
+ {
+ return Attributes == other.Attributes;
+ }
+
+ public override bool Equals(object obj)
+ {
+ return obj is PInvokeFlags other && Equals(other);
+ }
+
+ public override int GetHashCode()
+ {
+ return Attributes.GetHashCode();
+ }
}
/// <summary>