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:
authorThays Grazia <thaystg@gmail.com>2019-04-18 19:35:51 +0300
committerGitHub <noreply@github.com>2019-04-18 19:35:51 +0300
commitffcd7990d87e560c63413293c8efe1d1fc4e3584 (patch)
tree692e1e261bcfd13c665260a7d631a8207ced0683
parenta1177c17f75c0aeed2d3613897dddbe65d5829dd (diff)
parent8cb8b23e1a3012b8a945d8c8de6e279c6a56b491 (diff)
Merge pull request #32 from thaystg/thays_ambiguous_exception
Cherry pick of AmbiguousImplementationException
-rw-r--r--src/System.Private.CoreLib/shared/System/HResults.cs1
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs36
-rw-r--r--src/System.Private.CoreLib/src/Resources/Strings.resx3
3 files changed, 40 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/HResults.cs b/src/System.Private.CoreLib/shared/System/HResults.cs
index 4a5ec0d63..9c8db2143 100644
--- a/src/System.Private.CoreLib/shared/System/HResults.cs
+++ b/src/System.Private.CoreLib/shared/System/HResults.cs
@@ -27,6 +27,7 @@ namespace System
{
internal const int S_OK = unchecked((int)0x00000000);
internal const int COR_E_ABANDONEDMUTEX = unchecked((int)0x8013152D);
+ internal const int COR_E_AMBIGUOUSIMPLEMENTATION = unchecked((int)0x8013106A);
internal const int COR_E_AMBIGUOUSMATCH = unchecked((int)0x8000211D);
internal const int COR_E_APPDOMAINUNLOADED = unchecked((int)0x80131014);
internal const int COR_E_APPLICATION = unchecked((int)0x80131600);
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs b/src/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs
new file mode 100644
index 000000000..1a7ef0aef
--- /dev/null
+++ b/src/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs
@@ -0,0 +1,36 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Globalization;
+using System.Runtime.Serialization;
+
+namespace System.Runtime
+{
+ [Serializable]
+ public sealed class AmbiguousImplementationException : Exception
+ {
+ public AmbiguousImplementationException()
+ : base(SR.AmbiguousImplementationException_NullMessage)
+ {
+ HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
+ }
+
+ public AmbiguousImplementationException(string message)
+ : base(message)
+ {
+ HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
+ }
+
+ public AmbiguousImplementationException(string message, Exception innerException)
+ : base(message, innerException)
+ {
+ HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
+ }
+
+ private AmbiguousImplementationException(SerializationInfo info, StreamingContext context)
+ : base(info, context)
+ {
+ }
+ }
+}
diff --git a/src/System.Private.CoreLib/src/Resources/Strings.resx b/src/System.Private.CoreLib/src/Resources/Strings.resx
index 8c132237e..f161741e3 100644
--- a/src/System.Private.CoreLib/src/Resources/Strings.resx
+++ b/src/System.Private.CoreLib/src/Resources/Strings.resx
@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <data name="AmbiguousImplementationException_NullMessage" xml:space="preserve">
+ <value>Ambiguous implementation found.</value>
+ </data>
<data name="Arg_AccessException" xml:space="preserve">
<value>Cannot access member.</value>
</data>