合并 System.Threading.Tasks.NET35
智能大石头 authored at 2023-03-16 23:32:48
419.00 B
X
namespace System.Threading.Tasks;

public class UnobservedTaskExceptionEventArgs : EventArgs
{
	private AggregateException exception;

	private bool wasObserved;

	public AggregateException Exception => exception;

	public bool Observed => wasObserved;

	public UnobservedTaskExceptionEventArgs(AggregateException exception)
	{
		this.exception = exception;
	}

	public void SetObserved()
	{
		wasObserved = true;
	}
}