Exposes runtime functionality to Appdomain implementation in corefx
authorRahul Kumar <rahku@microsoft.com>
Tue, 30 Aug 2016 21:56:11 +0000 (14:56 -0700)
committerRahul Kumar <rahku@microsoft.com>
Thu, 8 Sep 2016 15:43:13 +0000 (08:43 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/0535ab83944028bb8ed1b323c8537ca8ce5ac8e2

src/coreclr/src/mscorlib/model.xml
src/coreclr/src/mscorlib/src/System/AppContext/AppContext.cs

index 67db0a0..d955de2 100644 (file)
       <Member Name="SetSwitch(System.String,System.Boolean)" />
       <Member Name="TryGetSwitch(System.String,System.Boolean@)" />
       <Member Name="GetData(System.String)" />
+      <Member MemberType="Event" Name="UnhandledException" />
     </Type>
     <Type Name="System.ApplicationException">
       <Member Name="#ctor" />
index 0b0643d..b318c34 100644 (file)
@@ -49,6 +49,21 @@ namespace System
             return AppDomain.CurrentDomain.GetData(name);
         }
 
+        public static event UnhandledExceptionEventHandler UnhandledException
+        {
+            [System.Security.SecurityCritical]
+            add
+            {
+                AppDomain.CurrentDomain.UnhandledException += value;
+            }
+
+            [System.Security.SecurityCritical]
+            remove
+            {
+                AppDomain.CurrentDomain.UnhandledException -= value;
+            }
+        }
+
         #region Switch APIs
         static AppContext()
         {