<FeatureDbiOopDebugging_HostOneCoreamd64 Condition="'$(TargetArch)' == 'amd64'">true</FeatureDbiOopDebugging_HostOneCoreamd64>
<FeatureEventTrace>true</FeatureEventTrace>
<FeatureExceptionDispatchInfo>true</FeatureExceptionDispatchInfo>
+ <FeatureExceptionNotifications>true</FeatureExceptionNotifications>
<FeatureFrameworkInternal>true</FeatureFrameworkInternal>
<FeatureHijack>true</FeatureHijack>
<FeatureInteropDebugging Condition="('$(TargetArch)' == 'i386') or ('$(TargetArch)' == 'amd64')">true</FeatureInteropDebugging>
add_definitions(-DFEATURE_EVENTSOURCE_XPLAT=1)
endif(CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DFEATURE_EXCEPTIONDISPATCHINFO)
+add_definitions(-DFEATURE_EXCEPTION_NOTIFICATIONS)
# NetBSD doesn't implement this feature
if(NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
add_definitions(-DFEATURE_HIJACK)
<Member Name="#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
</Type>
<Type Name="System.AppContext">
+ <Member MemberType="Event" Name="FirstChanceException" />
+ <Member MemberType="Event" Name="ProcessExit" />
+ <Member MemberType="Event" Name="UnhandledException" />
+ <Member Name="add_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)" />
+ <Member Name="add_ProcessExit(System.EventHandler)" />
+ <Member Name="add_UnhandledException(System.UnhandledExceptionEventHandler)" />
<Member Name="get_BaseDirectory" />
- <Member MemberType="Property" Name="BaseDirectory" />
<Member Name="get_TargetFrameworkName" />
- <Member MemberType="Property" Name="TargetFrameworkName" />
- <Member Name="DefineSwitchDefault(System.String,System.Boolean)" />
+ <Member Name="GetData(System.String)" />
+ <Member Name="remove_FirstChanceException(System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs>)" />
+ <Member Name="remove_ProcessExit(System.EventHandler)" />
+ <Member Name="remove_UnhandledException(System.UnhandledExceptionEventHandler)" />
+ <Member Name="SetData(System.String,System.Object)" />
<Member Name="SetSwitch(System.String,System.Boolean)" />
<Member Name="TryGetSwitch(System.String,System.Boolean@)" />
- <Member Name="GetData(System.String)" />
- <Member MemberType="Event" Name="UnhandledException" />
+ <Member MemberType="Property" Name="BaseDirectory" />
+ <Member MemberType="Property" Name="TargetFrameworkName" />
</Type>
<Type Name="System.ApplicationException">
<Member Name="#ctor" />
<Member MemberType="Property" Name="SourceException" />
</Type>
<!-- #endif FEATURE_EXCEPTIONDISPATCHINFO -->
+ <Type Name="System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs">
+ <Member Name="#ctor(System.Exception)" />
+ <Member Name="get_Exception" />
+ <Member MemberType="Property" Name="Exception" />
+ </Type>
<Type Name="System.Runtime.GCLatencyMode">
<Member MemberType="Field" Name="Batch" />
<Member MemberType="Field" Name="Interactive" />
<ItemGroup>
<ExceptionservicesSources Condition="'$(FeatureCorruptingExceptions)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\CorruptingExceptionCommon.cs" />
<ExceptionservicesSources Condition="'$(FeatureExceptionDispatchInfo)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\ExceptionServicesCommon.cs" />
+ <ExceptionservicesSources Condition="'$(FeatureExceptionNotifications)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\ExceptionServices\ExceptionNotification.cs" />
</ItemGroup>
<ItemGroup>
<HostingSources Condition="'$(FeatureHostAssemblyResolver)' == 'true'" Include="$(BclSourcesRoot)\System\Runtime\Loader\AssemblyLoadContext.cs" />
public static string TargetFrameworkName { get { throw null; } }
[System.Security.SecuritySafeCriticalAttribute]
public static object GetData(string name) { throw null; }
+ [System.Security.SecuritySafeCriticalAttribute]
+ public static void SetData(string name, object data) { }
public static void SetSwitch(string switchName, bool isEnabled) { }
public static bool TryGetSwitch(string switchName, out bool isEnabled) { isEnabled = default(bool); throw null; }
public static event UnhandledExceptionEventHandler UnhandledException { add { } remove { } }
+ public static event System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs> FirstChanceException { add { } remove { } }
+ public static event System.EventHandler ProcessExit { add { } remove { } }
}
[System.Runtime.InteropServices.ClassInterfaceAttribute((System.Runtime.InteropServices.ClassInterfaceType)(0))]
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
{
public HandleProcessCorruptedStateExceptionsAttribute() { }
}
+ public sealed partial class FirstChanceExceptionEventArgs : EventArgs
+ {
+ public FirstChanceExceptionEventArgs(Exception exception) { }
+ public Exception Exception { get { throw null; } }
+ }
}
namespace System.Runtime.InteropServices
{
return AppDomain.CurrentDomain.GetData(name);
}
+ [System.Security.SecuritySafeCritical]
+ public static void SetData(string name, object data)
+ {
+ AppDomain.CurrentDomain.SetData(name, data);
+ }
+
public static event UnhandledExceptionEventHandler UnhandledException
{
[System.Security.SecurityCritical]
}
}
+ public static event System.EventHandler<System.Runtime.ExceptionServices.FirstChanceExceptionEventArgs> FirstChanceException
+ {
+ [System.Security.SecurityCritical]
+ add
+ {
+ AppDomain.CurrentDomain.FirstChanceException += value;
+ }
+ [System.Security.SecurityCritical]
+ remove
+ {
+ AppDomain.CurrentDomain.FirstChanceException -= value;
+ }
+ }
+
+ public static event System.EventHandler ProcessExit
+ {
+ [System.Security.SecurityCritical]
+ add
+ {
+ AppDomain.CurrentDomain.ProcessExit += value;
+ }
+ [System.Security.SecurityCritical]
+ remove
+ {
+ AppDomain.CurrentDomain.ProcessExit -= value;
+ }
+ }
+
#region Switch APIs
static AppContext()
{
--- /dev/null
+// 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.
+/*=============================================================================
+**
+** File: ExceptionNotification.cs
+**
+**
+** Purpose: Contains definitions for supporting Exception Notifications.
+**
+** Created: 10/07/2008
+**
+** <owner>gkhanna</owner>
+**
+=============================================================================*/
+#if FEATURE_EXCEPTION_NOTIFICATIONS
+namespace System.Runtime.ExceptionServices {
+ using System;
+
+ // Definition of the argument-type passed to the FirstChanceException event handler
+ public class FirstChanceExceptionEventArgs : EventArgs
+ {
+ // Constructor
+ public FirstChanceExceptionEventArgs(Exception exception)
+ {
+ m_Exception = exception;
+ }
+
+ // Returns the exception object pertaining to the first chance exception
+ public Exception Exception
+ {
+ get { return m_Exception; }
+ }
+
+ // Represents the FirstChance exception instance
+ private Exception m_Exception;
+ }
+}
+#endif // FEATURE_EXCEPTION_NOTIFICATIONS
\ No newline at end of file